Examples
Input: matrix = [[1,4],[2,6]]
Output: [[2,1],[6,4]]
Explanation: The 2x2 matrix is rotated 90 degrees clockwise.
Input: matrix = [[1,2,3],[4,5,6],[7,8,9]]
Output: [[7,4,1],[8,5,2],[9,6,3]]
Explanation: The 3x3 matrix is rotated 90 degrees clockwise.
Input: matrix = [[3]]
Output: [[3]]
Explanation: The 1x1 matrix remains the same after rotation.