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

  1. A.

    \(\theta (1)\)

  2. B.

    \(\theta (log \ n)\)

  3. C.

    \(\theta (n)\)

  4. 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…