GATE CS 2021 · Set-1 · Asymptotic Analysis & Recurrences

MCQ · 1 mark · Problem PROG-DIVC-0174

A binary search tree T contains n distinct elements. What is the time complexity of picking an element in T that is smaller than the maximum element in T?
  1. A
    \(\Theta(n\log n)\)
  2. B
    \(\Theta(n)\)
  3. C
    \(\Theta(\log n)\)
  4. D
    \(\Theta(1)\)

Solve it on GATE DA practice →More Searching & Sorting Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/357442/gate-cse-2021-set-1-question-10

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com