edited by
12,706 views
34 34 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$

8 Answers

14 14 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.

2 2 votes
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)
}

 

 

Answer:
Position:
Show:

Related questions

39 39 votes
4 answers 4 answers
15.4k
15.4k views
go_editor asked Feb 14, 2015
15,423 views
Consider the following array of elements.$\langle 89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100 \rangle$The minimum number of interchanges needed to convert it into a ma...
49 49 votes
5 answers 5 answers
14.9k
14.9k views
go_editor asked Feb 14, 2015
14,924 views
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
34 34 votes
7 answers 7 answers
19.9k
19.9k views
go_editor asked Feb 14, 2015
19,852 views
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$$213$$142$$71$
60 60 votes
4 answers 4 answers
18.5k
18.5k views
Misbah Ghaya asked Feb 13, 2015
18,494 views
What are the worst-case complexities of insertion and deletion of a key in a binary search tree?$\Theta(\log n)$ for both insertion and deletion$\Theta(n)$ for both inser...