| hide_title | true |
|---|---|
| custom_edit_url | |
| pagination_prev | |
| pagination_next |
Home > @rushstack/node-core-library > MinimumHeap
Implements a standard heap data structure for items of type T and a custom comparator. The root will always be the minimum value as determined by the comparator.
Signature:
export declare class MinimumHeap<T> |
Constructor |
Modifiers |
Description |
|---|---|---|
|
Constructs a new MinimumHeap instance. |
|
Property |
Modifiers |
Type |
Description |
|---|---|---|---|
|
|
number |
Returns the number of items in the heap. |
|
Method |
Modifiers |
Description |
|---|---|---|
|
Retrieves the root item from the heap without removing it. | ||
|
Retrieves and removes the root item from the heap. The next smallest item will become the new root. | ||
|
Pushes an item into the heap. |