Company: Ubs_10march
Difficulty: medium
Texture Image Transformation Problem Description A 3D model's surface is painted with a binary texture image : an n x n grid in which 1 is a black pixel and 0 is a white pixel. Three transformations are applied to the texture, in this exact order : Rotation - the image is rotated clockwise by rotation degrees, where rotation is 90 , 180 or 270 . Vertical Flip - if verticalFlip = 1 , the image is flipped along its horizontal axis, so the rows appear in reverse order from top to bottom. If verticalFlip = 0 , nothing happens at this step. Horizontal Flip - if horizontalFlip = 1 , the image is flipped along its vertical axis, so within every row the pixels appear in reverse order from left to right. If horizontalFlip = 0 , nothing happens at this step. Implement the function getFinalImage(image, rotation, verticalFlip, horizontalFlip) and report the texture image that results after all three steps have been applied in order. Input Format The first line contains a single integer n , th