• Given a heap aHeap, return a new heap with the same elements but without the root (the minimal element inside the heap). Raises an error if the heap is empty.

    Parameters

    • aHeap: Heap<any>

      the heap to consider

    Returns Heap<any>

    a new heap with the same elements as aHeap but its minimal value