From c9d4846d32664ddaff9ed787ebf03bb417680ec1 Mon Sep 17 00:00:00 2001 From: Jarvis Jeason Jacob Date: Wed, 26 Aug 2026 23:49:09 +0530 Subject: [PATCH] Add docstring to build_tree() --- searches/binary_tree_traversal.py | 4 ++++ 1 file changed, 4 insertions(+) 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()