From 77a3e5282426926f28dc42bbde48bedff9548860 Mon Sep 17 00:00:00 2001 From: bhushxntk <115457620+bhushxntk@users.noreply.github.com> Date: Mon, 10 Oct 2022 14:11:38 +0530 Subject: [PATCH] Update HeapSort.py --- Sorting/HeapSort.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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