A min-max heap, implemented as a way to learn some
Rust. Heap data must be Copy
, Clone
, PartialOrd
.
The implementation is based on a paper by M.D Atkinson, J.-R. Sack and others, "Min-Max Heaps And Generalized Priority Queues" and on the relevant Wikipedia article.
This heap can be used as a DEPQ (Double Ended Priority Queue) implementation.
-
Vec<T>
is used for underlying array representation. -
A small number of tests are written and located in
minmaxheap/minmaxheap_tests.rs
file;