GATE CS 2021, set 1 · Question 20 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

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) Θ(n log n)
  2. (B) Θ(n)
  3. (C) Θ(log n)
  4. (D) Θ(1)
Answer

Answer (D)

Answer from the official GATE CS 2021 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes