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
GATE CSE 2012 · Q5
Time
Select one answerSingle correct
Solution
Official answer: C) (n)
Binary Search TreesIn a balanced binary search tree with elements, the height of the tree is .
The worst-case search time is proportional to the height of the tree:
Given :
As , the linear term dominates the logarithmic term . Therefore:
Hence, the correct option is (C).
Try the question first, then check your work.
Examiner trap
The search time in a balanced binary search tree with elements is proportional to . Substitute .
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
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.
An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.
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 TreesIndependent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.