Learn how to rotate a matrix in place. We'll go over the complex algorithm required in heavy detail.
Rotate Square Matrix in Place
⬇️
789456123
Instructions
Write a function that takes a square matrix as input. A square matrix has the same number of rows and columns, e.g. 3 x 3, 4 x 4, 5 x 5. It should return the same matrix rotated 90 degrees clockwise. The rotation should happen in place, meaning you may not create any extra matrixes or arrays in your function.