• edited by
12,844 views
36 36 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

40 40 votes
4 answers 4 answers
15.6k
15.6k views
go_editor asked Feb 14, 2015
15,599 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...
51 51 votes
5 answers 5 answers
15.0k
15.0k views
go_editor asked Feb 14, 2015
15,041 views
Given that hash table $T$ with $25$ slots that stores $2000$ elements, the load factor $a$ for $T$ is _________.
35 35 votes
7 answers 7 answers
20.0k
20.0k views
go_editor asked Feb 14, 2015
19,990 views
The result evaluating the postfix expression $10 \ 5 + 60 \ 6 / * 8 -$ is $284$$213$$142$$71$
61 61 votes
4 answers 4 answers
18.7k
18.7k views
Misbah Ghaya asked Feb 13, 2015
18,684 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...