Computer Sciences > GATE 2021 SET-2 > Heaps
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
Θ(1)
B
Θ(log n)
C
Θ(n)
D
Θ(n log n)

Explanation

Correct : c

Similar Questions

What is the worst-case time complexity of insertion in an AVL tree?
Question #23 Medium
Which operations on a binary search tree have O(h) complexity?
Question #31 Easy
Compare search complexities of sorted array vs balanced BST.
Question #47 Hard

Related Topics

Data Structures Binary Search Tree Time Complexity Algorithm Analysis Tree Algorithms Computer Science