GateAI
Binary Search Trees

GATE CSE 2017 Set 1 · Q6

MCQ1 markEasy

Time

Let TT be a binary search tree with 15 nodes. The minimum and maximum possible heights of TT are: Note: The height of a tree with a single node is 0.

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: B) 3 and 14 respectively

Binary Search Trees

Given N=15N = 15 nodes and the height of a single node tree is 00:

  1. Minimum Height (hmin⁡h_{\min}): The height is minimized when the tree is as balanced and full as possible. For height hh, the maximum number of nodes in a binary tree is:

    Nmax⁡=2h+1−1N_{\max} = 2^{h+1} - 1

    For N=15N = 15 nodes:

    15≤2h+1−1  ⟹  2h+1≥16  ⟹  h+1≥4  ⟹  hmin⁡=315 \le 2^{h+1} - 1 \implies 2^{h+1} \ge 16 \implies h+1 \ge 4 \implies h_{\min} = 3
  2. Maximum Height (hmax⁡h_{\max}): The height is maximized when the binary search tree is completely skewed (degenerate into a linked list).

    hmax⁡=N−1=15−1=14h_{\max} = N - 1 = 15 - 1 = 14

Therefore, the minimum and maximum possible heights are 3 and 14 respectively, corresponding to option (B).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Binary Search Trees previous year question is Q6 of the GATE CSE 2017 Set 1 paper. Find more GATE CSE PYQs on Binary Search Trees in Programming and Data Structures, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Binary Search Trees PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Binary Search Trees in GATE CSE

Binary Search Trees has 21 GATE CSE PYQs across 17 papers from 2011 to 2026. 8 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2017 Set 1.

How GATE tests Binary Search Trees

More from GATE CSE 2017 Set 1

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2017 Set 1 · Q6 · MCQ

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.

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.