# Problem Definition

## Description

You are given an n x n 2D matrix representing an image.

Rotate the image by 90 degrees (clockwise).

You need to do this in place.

Note that if you end up using an additional array, you will only receive partial score.

**Example:**

If the array is

```plaintext
[
    [1, 2],
    [3, 4]
]
```

Then the rotated array becomes:

```plaintext
[
    [3, 1],
    [4, 2]
]
```

## Notes

1. [Geeks for Geeks - Inplace rotate square matrix by 90 degrees | Set 1](https://www.geeksforgeeks.org/inplace-rotate-square-matrix-by-90-degrees/)
1. [YT Video - Rotate an n x n matrix - My Programming Sandbox](https://www.youtube.com/watch?v=Jtu6dJ0Cb94)