Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit d7a9065

Browse files
Update 8_binary_tree.py
1 parent 28ddf40 commit d7a9065

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

set3/8_binary_tree.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,24 @@ def printTree(self, root):
4141
root+b#b is added as right child of root
4242
b + c#c is added as the left child of b
4343

44+
'''Tree is now
45+
1
46+
/ \
47+
2 3
48+
/
49+
4
50+
'''
4451

4552
root.printTree(root)
4653

4754
b-c#c is removed as the left child of b
4855

56+
'''Tree is now
57+
1
58+
/ \
59+
2 3
60+
'''
61+
4962
root.printTree(root)
5063

5164

0 commit comments

Comments
 (0)