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

    Function peek

    • Returns the maximum element (root) of the max-heap without removing it.

      Type Parameters

      Parameters

      • instance: H

        The max-heap instance.

      Returns undefined | H[0]

      The maximum element or undefined if heap is empty.