A priority queue.
A priority queue provides a way to
elements, and to
them in some specified
order. Elements that are smaller in the specified order are
dequeued first. It is also possible to get the
, that is, the element that would be dequeued next.
Additionally, the queue may provide a method to peek at
element that would be dequeued
.
The relative order of the elements enqueued should not change during
queue operations. Nonetheless, some implementations may give the caller a
way to notify the queue that the
.
|