This repository was archived by the owner on Feb 3, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-22
lines changed
Expand file tree Collapse file tree 1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -139,34 +139,16 @@ def countLeaves(self) :
139139 [3.4]
140140 [5,6]
141141 """
142- # made a binary tree -> 1
143- # node class -> 1
144- # insert method -> 1
145- # NodesBeenMade for number of nodes -> 1
146- # number of floors -> 1
147- # how to define number of leaves -> 1
148- # made the 4 method and its working -> 1
149- # delete the tree -> 1
150- # MAX and MIN in our tree -> 1
151- # full tree -> 0
152- # compare of two tree -> 1
153-
154142
155143
144+ # making a test binary tree
156145tree = BinaryTree (2 )
157146tree .root .left = Node (3 )
158147tree .root .right = Node (4 )
159148tree .root .left .left = Node (5 )
160149tree .root .left .right = Node (6 )
161150
162-
163-
164-
165- # print(tree.PrintTree("preorder"))
166- # result = tree.MAX_MIN()
167- # print("MAX and MIN is equal to : " , result)
168- # x = tree.find(5)
169- # print("Found the desired element at the : [" , x , "] floor ")
151+ # trying out the methods
170152print (tree .PrintTree ('preorder' ))
171153print (tree .PrintTree ('inorder' ))
172154print (tree .PrintTree ('postorder' ))
@@ -177,6 +159,4 @@ def countLeaves(self) :
177159print (tree .draw ())
178160print (tree .countLeaves ())
179161
180- # lst = list(map(int , input('Enter your tree with ' , type , " order : ").split()))
181- # print(lst)
182162
You can’t perform that action at this time.
0 commit comments