diff --git a/searches/binary_tree_traversal.py b/searches/binary_tree_traversal.py index 47af57f7f94d..d6ceb86d2ae2 100644 --- a/searches/binary_tree_traversal.py +++ b/searches/binary_tree_traversal.py @@ -15,6 +15,10 @@ def __init__(self, data): def build_tree() -> TreeNode: + """ + Builds a binary tree by receiving input and returns the root node of the tree. + Stops and returns the tree once 'N' is entered. + """ print("\n********Press N to stop entering at any point of time********\n") check = input("Enter the value of the root node: ").strip().lower() q: queue.Queue = queue.Queue()