A binary search tree \(T\) contains \( n\) distinct elements. What is the time…

GATE · 2021 · CS · Set 1 · Computer Science & IT

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)\)

Attempted by 815 students.

Show answer

Correct answer: D

The worked solution is available to enrolled students.

Video solution available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…