Elements comparator.
Defaults to comparator which compares elements with the > and === operators.
Check if heap is empty.
Get heap size
Clear heap.
Clone heap.
Notice that items are not cloned, only heap internal structure is cloned.
Check if heap contains item.
Item or function which checks for equality with that item.
Find index of item in the heap.
Function which tests for equality with needed item.
Index of the item.
Peek element from heap root (does not remove it).
Heap root.
Pop element from heap root (does remove it).
Heap root.
Push item into heap.
Item to be pushed.
Remove item located at index
.
Value of the item index.
Replace heap root with another item.
Item that needs to replace the root.
Previous value of the heap root.
Get array representation of the heap.
Update item located at index
with newItem
.
Index of the element that needs to be updated.
Value that needs to be put at that index.
Binary heap.