Click4Ai

305.

Easy

The **Image Rotation** problem involves rotating an image by 90 degrees. **Example:** Rotating a 4x4 image 90 degrees clockwise. **Constraints:** The input image is a 2D numpy array, and the output should be a rotated 2D numpy array.

Test Cases

Test Case 1
Input: [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
Expected: [[4,8,12,16],[3,7,11,15],[2,6,10,14],[1,5,9,13]]
Test Case 2
Input: [[1,2],[3,4]]
Expected: [[2,4],[1,3]]
+ 3 hidden test cases