Imagine that you are designing an application where you need to perform the operations Insert, Delete Maximum,

Question:

Imagine that you are designing an application where you need to perform the operations Insert, Delete Maximum, and Delete Minimum. For this application, the cost of inserting is not important, because it can be done off-line prior to startup of the time-critical section, but the performance of the two deletion operations are critical. Repeated deletions of either kind must work as fast as possible. Suggest a data structure that can support this application, and justify your suggestion. What is the time complexity for each of the three key operations?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: