GATE CS 2021, set 2 · Question 12 · Programming and Data Structures · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer
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)
Answer
Answer (C)
Answer from the official GATE CS 2021 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes