Skip to content

Commit 9a26e77

Browse files
committed
explanations.md added now, exe files deleted
1 parent f4736b0 commit 9a26e77

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Rotate Image : Explanation
2+
3+
So in this problem we can see that we are given with an array 1 2 3 4 5 6 7 8 9. We are required to rotate it in the right(as a square) direction once (result: 7 4 1 6 5 2 9 8 3). If we carefully observe the original matrix and the rotated matrix we are provided with, we can see that the first row becomes the last column, second row becomes the second last column and so on till the last row becomes the first column. So this gives us a clue that we need to transpose this matrix. After transposing 1 2 3 4 5 6 7 8 9 we get 1 4 7 2 5 6 3 6 9. Now if you look closely once again, this is the mirror of our solution. So to get the solution we reverse each of the rows thus reaching our desired solution.
-40.9 KB
Binary file not shown.

0 commit comments

Comments
 (0)