A collection of basic abstract heap data structures.
Dynamic Min & Max Implicit heaps.
An implicit heap is an implementation of a heap consisting of a complete binary tree whose nodes contain the heap items, one node per item.
Implicit Heap Implementation
Insert (push) and remove min/max (pop) have
O(log n) complexity. The size of the slices (array) is dynamic, with a minimum of 8 elements and doubles each time is full, and shrink to half each time it's
N < size/4.
The keys are
intand values can be any type
For best performance use a small non sparsed Key value distribution. (100-300 incremental values).