...
GATE-2024-CS1(Forenoon)
October 15, 2024
C-Programming
October 17, 2024
GATE-2024-CS1(Forenoon)
October 15, 2024
C-Programming
October 17, 2024

GATE 2017 [Set-1]

Question 6

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.

A
4 and 15 respectively
B
3 and 14 respectively
C
4 and 14 respectively
D
3 and 15 respectively
Question 6 Explanation: 
T be a Binary Search Tree with 15 nodes.
The height of a tree with single node is 0.
Minimum possible height is when it is a complete binary tree.

Maximum possible height is when it is a skewed tree left/right.

So the minimum and maximum possible heights of T are: 3 and 14 respectively.
Correct Answer: B
Question 6 Explanation: 
T be a Binary Search Tree with 15 nodes.
The height of a tree with single node is 0.
Minimum possible height is when it is a complete binary tree.

Maximum possible height is when it is a skewed tree left/right.

So the minimum and maximum possible heights of T are: 3 and 14 respectively.

Leave a Reply

Your email address will not be published. Required fields are marked *