Data Structures | Heap | Question 12
Which of the following Binary Min Heap operation has the highest time complexity?
(A) Inserting an item under the assumption that the heap has capacity to accommodate one more item
(B) Merging with another heap under the assumption that the heap has capacity to accommodate items of other heap
(C) Deleting an item from heap
(D) Decreasing value of a key
Explanation: The merge operation takes O(n) time, all other operations given in question take O(Logn) time.
The Binomial and Fibonacci Heaps do merge in better time complexity.
Quiz of this Question