An efficient implementation of a priority queue.
The implementation of PQueue
is based on a pairing heap, a simple and efficient implementation of a general-purpose priority queue. PQueue
supports insert
, merge
, and peek
in constant time, and extract
and delete
in logarithmic time.