Add a new element to the heap and keep items sorted by ascending frequency
Element to insert
Clear the content of the heap
Access an item at a given index
Index of the item
The item or undefined
if the index is out of the array
Get the index of an element by its value
Value of the element to search for
Index of the element or -1 if it is not in the heap
Remove and returns the element with the smallest frequency in the heap
The element with the smallest frequency in the heap
Remove an item at a given index and keep items sorted by ascending frequency
Index of the item to remove
Get the number of items in the heap
Generated using TypeDoc
A MinHeap stores items sorted by ascending frequency
Thomas Minier