module HeapImpl:PQ
type 'a t
val empty : 'a Util.comparator -> 'a tval insert : 'a -> 'a t -> 'a tinsert x q yields a queue containing x and the elements of qval remove : 'a t -> ('a * 'a t) optionremove q returns the maximum element of q
(according to comparator q) and another queue q' containing
the remaining elements
It returns None if the queue is empty.
val max : 'a t -> 'a optionmax q returns the maximum element of q (according to comparator q)
returns None if the queue is empty.val size : 'a t -> intsize q returns the number of elements of qval is_empty : 'a t -> boolis_empty q returns true if q is emptyval comparator : 'a t -> 'a Util.comparatorcomparator q returns the comparator that q is ordered by