Swap arr whenever index is swapped
arr [ largest ] , arr [ i ] = arr [ i ] , arr [ largest ] NEW_LINE index [ largest ] , index [ i ] = index [ i ] , index [ largest ] NEW_LINE heapify ( arr , index , largest ) NEW_LINE def heapSort ( arr , index , n ) : NEW_LINE