© 1991 by British Computer Society
| ||||||||||||||||||||||||||||||||||||||||||||||||||||
A Mergeable Double-ended Priority Queue
Department of Computer Science, Old Dominion University, Norfolk, VA 23529-0162, USA
An implementation of a double-ended priority queue is discussed. This data structure referred to as minmaxpair heap can be built in linear time; the operations Delete-min, Delete-max and Insert take O(log n) time, while Find-min and Find-max run in O(1) time. In contrast to the min-max heaps, it is shown that two minmaxpair heaps can be merged in sublinear time. More precisely, two minmaxpair heaps of sizes n and k can be merged in time O(log (n/k) * log k).
Received November 1990. revised February 1991.
* Department of Computer Science, Old Dominion University, Norfolk, VA 235290162, USA