Rotate an n x n matrix by 90 degrees clockwise in-place.
Sample Input:
[[1,2,3],[4,5,6],[7,8,9]]
Sample Output:
[[7,4,1],[8,5,2],[9,6,3]]
Hints
Hint 1
First transpose the matrix (swap rows and columns)
Hint 2
Then reverse each row
Hint 3
Or rotate layer by layer from outer to inner