(x)
Transform list into a maxheap, in-place, in O(len(x)) time.
Transform list into a maxheap, in-place, in O(len(x)) time.
Transform list into a maxheap in - place in O ( len ( x )) time .
def _heapify_max(x):
    """Transform list into a maxheap, in-place, in O(len(x)) time."""
    n = len(x)
    for i in reversed(range(n//2)):
        _siftup_max(x, i)
def _heapify_max ( x ) : n = len ( x ) for i in reversed ( range ( n // 2 ) ) : _siftup_max ( x , i )