#
2.4. PQ 2: Min-Max Heap
In
Problem
- The following operations must be performed as mixed in data processing:
- Store a record with a key in an arbitrary order.
- Fetch the record with the current largest key.
- Fetch the record with the current smallest key.
- The following operations must be performed as mixed in data processing:
A solution
- Design a data structure that offers the efficient implementation of the following operations (Double-Ended Priority Queue):
- Insert an element with an arbitrary key.
- Delete an element with the largest key.
- Delete an element with the smallest key.
- Design a data structure that offers the efficient implementation of the following operations (Double-Ended Priority Queue):
ref. [Horowitz 9.1]
{교육과정 외}