Let \(H\) be a binary min-heap consisting of \(n\) elements implemented…
GATE · 2021 · CS · Set 2 · Computer Science & IT
Let \(H\) be a binary min-heap consisting of \(n\) elements implemented as an array. What is the worst case time complexity of an optimal algorithm to find the maximum element in \(H\) ?
- A.
\(\theta (1)\) - B.
\(\theta (log \ n)\) - C.
\(\theta (n)\) - D.
\(\theta (n \ log \ n)\)
Attempted by 826 students.
Show answer
Correct answer: C
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…