Rotate a matrix 90 degrees clockwise.
MediumProblem Statement
Rotate a matrix 90 degrees clockwise.
Sample Input
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
Sample Output
[[7, 4, 1], [8, 5, 2], [9, 6, 3]]
Limits
Time: 2s · Memory: 256 MB
Rotate a matrix 90 degrees clockwise.
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
[[7, 4, 1], [8, 5, 2], [9, 6, 3]]
Time: 2s · Memory: 256 MB