GATE CS 2020 (Forenoon) — Question 51

Data StructuresBinary Search Trees (BSTs) & Binary HeapsMCQ2 marks · −2/3 if wrongMedium

In a balanced binary search tree with \( n \) elements, what is the worst case time complexity of reporting all elements in range \( [a, b] \)? Assume that the number of reported elements is \( k \).
  1. A
    \( \Theta(\log n) \)
  2. B
    \( \Theta(\log n + k) \)
  3. C
    \( \Theta(k \log n) \)
  4. D
    \( \Theta(n \log k) \)
Practise the full 2020-FN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on Binary Search Trees (BSTs) & Binary HeapsTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group