A deque with heap order is a deque (double-ended queue) such that each item has a real-valued key and the operation of finding 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 possible 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. This paper describes an implementation of deques with heap order for which the worst-case time per operation is O(1).
All Science Journal Classification (ASJC) codes
- Theoretical Computer Science
- Signal Processing
- Information Systems
- Computer Science Applications