diff --git a/Sorting/HeapSort.py b/Sorting/HeapSort.py index 7f75205..fb6bf01 100644 --- a/Sorting/HeapSort.py +++ b/Sorting/HeapSort.py @@ -19,9 +19,7 @@ def heapify(arr, n, i): # See if right child of root exists and is # greater than root - - if r < n and arr[largest] < arr[r]: - largest = r +remove() # Change root, if needed