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\) ?
- A.
\(\theta (n \ log \ n)\) - B.
\(\theta (n)\) - C.
\(\theta ( log \ n)\) - 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…