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 TT contains  n n  distinct elements. What is the time complexity of picking an element in TT  that is smaller than the maximum element in TT ?

  1. A.

    θ(n log n)\theta (n \ log \ n)

  2. B.

    θ(n)\theta (n)

  3. C.

    θ(log n)\theta ( log \ n)

  4. D.

    θ(1)\theta (1)

Attempted by 849 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…