While inserting the elements $71, 65, 84, 69, 67, 83$ in an empty binary search tree (BST) in the sequence shown, the element in the lowest level is
The Constructed Binary Search Tree from the given Elements will be
Clearly, the element in the lowest level in the above BST is 67. So, Option B is True.
First elelment is root then insert elements as 1.smaller elements then node should be on Left Subtree of that node this is true for every node. 2.Larger elements then node should be on Right Subtree of that node this is true for every node. Courtesy: GeekForGeeks Insert(Root,key) { if(Root is NULL) Create a Node with value as key and return Else if(Root.key >= key) Insert(Root.left,key) Else Insert(Root.right,key) }
in the sequence shown, the element in the lowest level is..
I don’t know but why everybody is talking about last level even in the best answer. In the question it is saying about lowest level and in the given. It basically means asking about 1st level node.
here the level 1 or height 0 contains element is 67. which is our answer Option- B
REF – What is the difference between tree depth and height?
https://youtu.be/FTlgB1YYhDo
64.3k questions
77.9k answers
243k comments
79.7k users