summaryrefslogtreecommitdiff
path: root/src/03
diff options
context:
space:
mode:
Diffstat (limited to 'src/03')
-rw-r--r--src/03/01/README.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/03/01/README.md b/src/03/01/README.md
index 5c0232e..9036d27 100644
--- a/src/03/01/README.md
+++ b/src/03/01/README.md
@@ -10,10 +10,8 @@ red-black tree.
/ \ \ / \ \
(10:1) (17:1) (35:1) (10:r) (17:r) (35:r)
-* copy tree
-* colour each node black
-* perform in order traversal
-* assign colour of Red/Black node based on height of each node
+* perform pre order traversal
+* assign colour of Red/Black node based on height of each AVL node
Step 1:
(20:b)
@@ -25,19 +23,21 @@ Step 2:
Step 3:
(20:b)
- / \
- (15:b) (30:b)
+ /
+ (15:b)
+ /
+ (10:r)
Step 4:
(20:b)
- / \
- (15:b) (30:b)
- /
- (10:r)
+ /
+ (15:b)
+ / \
+ (10:r) (17:r)
Step 5:
(20:b)
- / \
+ / \
(15:b) (30:b)
/ \
(10:r) (17:r)