GateAI
Binary Search Trees

GATE CSE 2012 · Q5

MCQ1 markEasy

Time

The worst case running time to search for an element in a balanced binary search tree with n2nn2^n elements is

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) (n)

Binary Search Trees

In a balanced binary search tree with NN elements, the height of the tree is Θ(log⁡N)\Theta(\log N).

The worst-case search time is proportional to the height of the tree:

T(N)=Θ(log⁡N)T(N) = \Theta(\log N)

Given N=n⋅2nN = n \cdot 2^n:

log⁡N=log⁡(n⋅2n)=log⁡2n+log⁡2(2n)=log⁡2n+n\log N = \log(n \cdot 2^n) = \log_2 n + \log_2(2^n) = \log_2 n + n

As n→∞n \to \infty, the linear term nn dominates the logarithmic term log⁡n\log n. Therefore:

T(N)=Θ(n+log⁡n)=Θ(n)T(N) = \Theta(n + \log n) = \Theta(n)

Hence, the correct option is (C).

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 Q5 of the GATE CSE 2012 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 2012.

How GATE tests Binary Search Trees

More from GATE CSE 2012

Share this solution

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

GateAI solution cardGATE CSE 2012 · Q5 · MCQ

The worst case running time to search for an element in a balanced binary search tree with n2n elements is

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.