• Given a heap aHeap, returns its root, which is the minimal element inside the heap. Raises an error if the heap is empty.

    Parameters

    • aHeap: Heap<any>

      the heap to consider

    Returns number

    the minimal element inside aHeap