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
Answer: (B)
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
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 neveropen!