Question 14316 – Algorithms
February 13, 2024Question 3764 – 2008 June UGC NET Paper 1
February 13, 2024Question 14329 – Algorithms
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?
Correct Answer: D
Question 42 Explanation:
The heap is nothing but a complete binary tree and uses linear search to find the elements.
In min heap, the parent key is less than or equal to (≤) the child keys. The maximum values should present in the farthest leaf node for the worst case time complexity.
To traverse all the elements in a heap will take O(n) time for the worst case because it uses the linear search to find the element.




