1. Rotate a matrix 90 degrees without using any other variable to store the result. Matrix values are random, which means they may or may not be in sorted order. Also, the number of rows can be anything.
eg.
Input
[
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
]
Expected output:
[
[7, 4, 1],
[8, 5, 2],
[9, 6, 3]
]