Deques with Heap Order
A deque with heap order is a deque (double-ended queue) such that each item has a real-valued key and the operation of returning an item of minimum key is allowed as well as the usual deque operations. By combining a standard deque implementation with an auxiliary heap (priority queue) it is possibel to implement a deque with heap order so that the worst-case time per operation is O(log n), where n is the number of items on the deque.