def main_heap(self, lst): # build heap hp = MaxBinaryHeap(lst) # sort by heap for i in range(len(lst) - 1, -1, -1): lst[i] = hp.pop() return lst
def main(self, lst): return MaxBinaryHeap.heapsort(lst)