How much time a heap will take to Find Min/Max value?
(A)
O(logN)
(B)
O(N)
(C)
O(1)
(D)
None
Answer: (C)
Explanation:
Finding Min/Max value in Heap is O(1) in the respective Min/Max heap.
Advantages of Heaps:
- Fast access to maximum/minimum element (O(1))
- Efficient Insertion and Deletion operations (O(log n))
Flexible size - Can be efficiently implemented as an array
- Suitable for real-time applications
Hence Option(C) is the correct answer.
Quiz of this Question
Please comment below if you find anything wrong in the above post
Article Tags :
Uncategorized
Recommended Articles