in DS edited by
22,354 views
27 votes
27 votes

The following numbers are inserted into an empty binary search tree in the given order: $10, 1, 3, 5, 15, 12, 16$. What is the height of the binary search tree (the height is the maximum distance of a leaf node from the root)?

  1. $2$
  2. $3$
  3. $4$
  4. $6$
in DS edited by
22.4k views

6 Answers

41 votes
41 votes
Best answer

Height is 3

Correct Answer: $B$

edited by

4 Comments

only height is asked not any other so wee need not to do it
0
0
They did not tell us to balance it. Balancing is carried out if it is mentioned that it is an AVL tree.
0
0
because they are not saying to balance , they have not even mentioned the word in thewhole question . in gate pyq the answer is “ only for exactly what is asked “
0
0
9 votes
9 votes

ans is (b)

2 Comments

what tool did you use bro to draw this ? Kinda curious
0
0
1
1
6 votes
6 votes
Ans) 3

Draw a BST for the given numbers And the Distance from root(i.e 10) to leaf(i.e 5) is 3.
5 votes
5 votes
ans will be 3 . hence option (b)
by
Answer:

Related questions