mirror of
https://github.moeyy.xyz/https://github.com/trekhleb/javascript-algorithms.git
synced 2024-12-27 15:41:16 +08:00
Update matrix rotation README.
This commit is contained in:
parent
75133592bb
commit
57378c5e19
@ -80,9 +80,29 @@ diagonal top-right/bottom-left rotation along with horizontal
|
|||||||
rotation.
|
rotation.
|
||||||
|
|
||||||
```
|
```
|
||||||
A B C A - - . . A
|
Let's say we have a string at the top of the matrix:
|
||||||
/ / --> B - - --> . . B
|
|
||||||
/ . . C - - . . C
|
A B C
|
||||||
|
• • •
|
||||||
|
• • •
|
||||||
|
|
||||||
|
Let's do top-right/bottom-left diagonal reflection:
|
||||||
|
|
||||||
|
A B C
|
||||||
|
/ / •
|
||||||
|
/ • •
|
||||||
|
|
||||||
|
And not let's do horizontal reflection:
|
||||||
|
|
||||||
|
A → →
|
||||||
|
B → →
|
||||||
|
C → →
|
||||||
|
|
||||||
|
The string has been rotated to 90 degree.
|
||||||
|
|
||||||
|
• • A
|
||||||
|
• • B
|
||||||
|
• • C
|
||||||
```
|
```
|
||||||
|
|
||||||
## References
|
## References
|
||||||
|
Loading…
Reference in New Issue
Block a user