Module Heap.Functional
Parameters
Signature
type elt= X.tType of elements
val empty : tThe empty heap
val add : elt -> t -> tadd x hreturns a new heap containing the elements ofh, plusx; complexity$O(log(n))$
val maximum : t -> eltmaximum hreturns the maximum element ofh; raisesEmptyHeapwhenhis empty; complexity$O(1)$
val remove : t -> tremove hreturns a new heap containing the elements ofh, except the maximum ofh; raisesEmptyHeapwhenhis empty; complexity$O(log(n))$