There was an error while loading. Please reload this page.
1 parent e548737 commit 0fe748aCopy full SHA for 0fe748a
1 file changed
searches/binary_tree_traversal.py
@@ -15,6 +15,10 @@ def __init__(self, data):
15
16
17
def build_tree() -> TreeNode:
18
+ """
19
+ Builds a binary tree by receiving input and returns the root node of the tree.
20
+ Stops and returns the tree once 'N' is entered.
21
22
print("\n********Press N to stop entering at any point of time********\n")
23
check = input("Enter the value of the root node: ").strip().lower()
24
q: queue.Queue = queue.Queue()
0 commit comments