Heap Data Structures Quiz

Placewit
Jul 14, 2021

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

Solution :

B) is correct.

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.

Thanks for Reading

Placewit grows the best engineers by providing an interactive classroom experience and by helping them develop their skills and get placed in amazing companies.

Learn more at Placewit. Follow us on Instagram and Facebook for daily learning.

--

--