原创 python實現堆排序--算法導論

def maxheapify(A, i): l = 2 * i + 1 r = 2 * i + 2 if l < Aheapsize and A[l] < A[i]: largest =