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

    Function pop

    • Removes and returns the minimum element (root) from the heap. Replaces root with last element and restores heap property.

      Type Parameters

      • H extends IHeapArray

        The type of min-heap array.

      Parameters

      • instance: H

        The min-heap instance.

      Returns H[number] | undefined

      The minimum element or undefined if heap is empty