Addressable Binary Heaps - v1.3.0
    Preparing search index...

    Function create

    • Creates a new min-heap instance, optionally initialized with elements.

      Type Parameters

      • H extends IHeapArray

        The type of min-heap array.

      Parameters

      • OptionalinitialNodes: H[number][] | readonly H[number][]

        Array of unsorted heap elements to initialize with. An element that appears more than once is added once. A value that is not an array is ignored.

      Returns H

      A new min-heap instance