in DS edited by
7,230 views
25 votes
25 votes

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

  1. $65$
  2. $67$
  3. $69$
  4. $83$
in DS edited by
7.2k views

8 Answers

5 votes
5 votes

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.

1 vote
1 vote
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)
}

 

 

by
1 vote
1 vote

See the question carefully...

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?

 

 

–1 vote
–1 vote
Answer:

Related questions