Skip to content

Commit 57378c5

Browse files
committed
Update matrix rotation README.
1 parent 7513359 commit 57378c5

File tree

1 file changed

+23
-3
lines changed
  • src/algorithms/uncategorized/square-matrix-rotation

1 file changed

+23
-3
lines changed

src/algorithms/uncategorized/square-matrix-rotation/README.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,29 @@ diagonal top-right/bottom-left rotation along with horizontal
8080
rotation.
8181

8282
```
83-
A B C A - - . . A
84-
/ / --> B - - --> . . B
85-
/ . . C - - . . C
83+
Let's say we have a string at the top of the matrix:
84+
85+
A B C
86+
• • •
87+
• • •
88+
89+
Let's do top-right/bottom-left diagonal reflection:
90+
91+
A B C
92+
/ / •
93+
/ • •
94+
95+
And not let's do horizontal reflection:
96+
97+
A → →
98+
B → →
99+
C → →
100+
101+
The string has been rotated to 90 degree.
102+
103+
• • A
104+
• • B
105+
• • C
86106
```
87107

88108
## References

0 commit comments

Comments
 (0)