#### amitkumar50/Code-examples/blob/master/ds_questions/questions/vectors_arrays/rotation-spiral/2-D_Array_Rotate_90Degree.md

```
## Problem
- You are given an n x n 2D matrix representing an image, rotate the image by 90 degrees (clockwise).
- You have to rotate the image in-place, which means you have to modify the input 2D matrix directly. DO NOT allocate another 2D matrix and do the rotation.
- Example
```c
input = {{1,2,3},
{4,5,6},
{7,8,9}};
output = {{7,4,1},
{8,5,2},
{9,6,3}};
```
## Logic
- *1.* Find Transpose of matrix
```c
Tranpose = {{1,4,7},
{2,5,8},
{3,6,9}};
```
```

This file has been truncated. show original