Initializes a new Heap instance.
Note: When constructing the heap from an array, it will operate directly on this array. For other iterables, it will create a new array.
Optional
container: Iterable<T> = []The initial values.
Optional
cmp: Comparer<any> = compareCompare function. Defaults to smaller values first.
Returns the total number of elements in the collection.
Generated using TypeDoc
A
Collection
is an iterable Container type. This is an abstract base class for user-defined collection types.Abstract
Implements