Home > @rushstack/node-core-library > MinimumHeap > (constructor)
MinimumHeap.(constructor)
Constructs a new MinimumHeap instance.
Signature:
constructor(comparator: (a: T, b: T) => number);
Parameters
Parameter | Type | Description |
|---|---|---|
comparator | (a: T, b: T) => number | a comparator function that determines the order of the items in the heap. If the comparator returns a value less than zero, then |