# Rotate Image

You are given an `n x n`

2D matrix representing an image. Rotate the image by 90 degrees (clockwise)

Example

```
1 2 3 1
-->
3 4 4 2
```

The following is an in-place algorithm.

You are given an `n x n`

2D matrix representing an image. Rotate the image by 90 degrees (clockwise)

Example

```
1 2 3 1
-->
3 4 4 2
```

The following is an in-place algorithm.