Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit 9482518

Browse files
committed
XD
1 parent 02e9789 commit 9482518

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

Node.py

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff 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
156145
tree = BinaryTree(2)
157146
tree.root.left = Node(3)
158147
tree.root.right = Node(4)
159148
tree.root.left.left = Node(5)
160149
tree.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
170152
print(tree.PrintTree('preorder'))
171153
print(tree.PrintTree('inorder'))
172154
print(tree.PrintTree('postorder'))
@@ -177,6 +159,4 @@ def countLeaves(self) :
177159
print(tree.draw())
178160
print(tree.countLeaves())
179161

180-
# lst = list(map(int , input('Enter your tree with ' , type , " order : ").split()))
181-
# print(lst)
182162

0 commit comments

Comments
 (0)