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

    Function pop

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

      Type Parameters

      Parameters

      • instance: H

        The max-heap instance.

      Returns H[0] | undefined

      The maximum element or undefined if heap is empty.