

Input: 'N' = 2, 'NUMS' = [[1, 2], [3, 4]]
Output: [[3, 1], [4, 2]]
Here the given matrix is rotated 90 degrees in a clockwise direction.
The first line of the input contains an integer, 'T’, denoting the number of test cases.
The first line of each test case will contain a single integer ‘N’, denoting the dimension of the matrix.
Each of the next ‘N’ lines contains ‘N’ integers separated by single spaces denoting the elements of the square matrix ‘NUMS’.
For each test case, print the matrix after rotating 90 degrees in a clockwise direction.
You don't need to print anything. It has already been taken care of. Just implement the given function.
1 <= 'T' <= 10
2 <= 'N' <= 10^2
1 <= 'NUMS[i]' <= 10^5
Time Limit: 1 sec
The idea of this approach is to relate the clockwise rotation of the square matrix to the transposition of the matrix. In the transposition of the matrix, the ith column of the original matrix becomes the ith row after the transposition. After rotation of the matrix, 90 degrees in a clockwise direction the ith column of the original matrix becomes the ith row in reverse order. Hence, we find the transpose of the matrix and then reverse the rows of the transposed matrix to get our desired output.