edited by
16,724 views
33 votes
33 votes

Let $T$ be a binary search tree with $15$ nodes. The minimum and maximum possible heights of $T$ are:

Note: The height of a tree with a single node is $0$.

  1. $4$ and $15$ respectively.
  2. $3$ and $14$ respectively.
  3. $4$ and $14$ respectively.
  4. $3$ and $15$ respectively.
edited by

10 Answers

1 votes
1 votes
Height of a binary search tree is minimum if it is a complete binary search tree..

Minimum height is lg(n+1)-1 as given n = 15 hence on solving We get lg(15+1) -1 which is equal to 3.

In the worst case the binary search tree will be skewed hence the max height will be 14.

Correct me if I am wrong.

I am new to this platform so please guide me further..
1 votes
1 votes

for max height in Binary search should in skewed form. Therefore  max height will be n-1=15-1=14

for min-height binary search tree (or any binary tree) = lowerbound(log2 n)

Answer:

Related questions

38 votes
38 votes
7 answers
6
Arjun asked Feb 14, 2017
18,832 views
Let $T$ be a tree with $10$ vertices. The sum of the degrees of all the vertices in $T$ is ________
25 votes
25 votes
3 answers
9