• Given a heap aHeap and a value aValue, inserts the value into the heap

    Parameters

    • aHeap: Heap<any>

      the heap to consider

    • aValue: any

      the value to add to the heap

    Returns Heap<any>

    a new heap with all the elements of aHeap and aValue