+14 votes
3.9k views

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$
asked in DS
edited | 3.9k views

## 7 Answers

+25 votes
Best answer

Height is 3

Correct Answer: $B$

answered by Veteran (61.4k points)
edited
0
Why are we not balancing the tree when the elements are inserted into the tree?

Won't it be a balanced binary search tree of height 2?
0
They didn't mention in the question, they are only saying use a empty binary search tree.
+6 votes

ans is (b)

answered by Active (4.7k points)
+5 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.
answered by Active (4.6k points)
+4 votes
ans will be 3 . hence option (b)
answered by
0 votes
answered by (175 points)
–1 vote
ans b)
answered by Loyal (5.2k points)
–3 votes
Why not height at root considered as 0
As per that the height is 2
Please correct me
answered by Junior (667 points)
+5
Read definition of height of tree ... which is # of longest edges from root to leaves .... and  height of node ... which is # of longest edges from that node to leaves ....
Answer:

+25 votes
4 answers
1
+15 votes
2 answers
2
+18 votes
3 answers
3
+46 votes
7 answers
4
+12 votes
4 answers
5
+12 votes
2 answers
6
+12 votes
5 answers
7