Expand description
A double-ended priority queue implemented with an interval heap.
An IntervalHeap
can be used wherever a BinaryHeap
can, but has the ability to
efficiently access the heap’s smallest item and accepts custom comparators. If you only need
access to either the smallest item or the greatest item, BinaryHeap
is more efficient.
Insertion has amortized O(log n)
time complexity. Popping the smallest or greatest item is
O(log n)
. Retrieving the smallest or greatest item is O(1)
.
Structs§
- Interval
Heap - A double-ended priority queue implemented with an interval heap.
- Into
Iter - A consuming iterator over an
IntervalHeap
in arbitrary order. - Iter
- An iterator over an
IntervalHeap
in arbitrary order.