Driver Code
arr = [ 50 , 40 , 70 , 60 , 90 ] NEW_LINE index = [ 3 , 0 , 4 , 1 , 2 ] NEW_LINE n = len ( arr ) NEW_LINE global heapSize NEW_LINE heapSize = n NEW_LINE heapSort ( arr , index , n ) NEW_LINE print ( " Reordered ▁ array ▁ is : ▁ " ) NEW_LINE print ( * arr , sep = ' ▁ ' ) NEW_LINE print ( " Modified ▁ Index ▁ array ▁ is : ▁ " ) NEW_LINE print ( * index , sep = ' ▁ ' ) NEW_LINE