Problem Statment
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Example 1:
If the array is
[
[1, 2],
[3, 4]
]
>> Then the rotated array becomes:
[
[3, 1],
[4, 2]
]