From 57378c5e19b00eb0449536026034d9e38893aaf4 Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Fri, 6 Jul 2018 11:52:34 +0300 Subject: [PATCH] Update matrix rotation README. --- .../square-matrix-rotation/README.md | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/algorithms/uncategorized/square-matrix-rotation/README.md b/src/algorithms/uncategorized/square-matrix-rotation/README.md index 4c16e16d..f58130c2 100644 --- a/src/algorithms/uncategorized/square-matrix-rotation/README.md +++ b/src/algorithms/uncategorized/square-matrix-rotation/README.md @@ -80,9 +80,29 @@ diagonal top-right/bottom-left rotation along with horizontal rotation. ``` -A B C A - - . . A -/ / --> B - - --> . . B -/ . . C - - . . C +Let's say we have a string at the top of the matrix: + +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