• The rank of a heap is the length of the rightmost spine, i.e the distance from the root to its righmost child

    Parameters

    • aHeap: Heap<any>

      the heap to consider

    Returns number

    the distance to its rightmost child