diff --git a/data_structures/Binary Tree/binary_seach_tree.py b/data_structures/Binary Tree/binary_seach_tree.py index 81532ee22..b6aac2990 100644 --- a/data_structures/Binary Tree/binary_seach_tree.py +++ b/data_structures/Binary Tree/binary_seach_tree.py @@ -75,3 +75,27 @@ class BinarySearchTree: def getRoot(self): return self.root + +''' +Example + 8 + / \ + 3 10 + / \ \ + 1 6 14 + / \ / + 4 7 13 +''' + +t = BinarySearchTree() +t.insert(8) +t.insert(3) +t.insert(1) +t.insert(6) +t.insert(4) +t.insert(7) +t.insert(10) +t.insert(14) +t.insert(13) + +t.preShow(t.getRoot())