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

    Function add

    • Adds a new element to the min-heap while maintaining the heap property. The element is initially added at the end and then heapified up as needed.

      Type Parameters

      • H extends IHeapArray

        The type of min-heap array.

      Parameters

      • instance: H

        The min-heap instance.

      • node: H[number]

        The new element to add.

      Returns void