How to implement heap sort? [Solved] | Sololearn: Learn to code for FREE!
+ 2

How to implement heap sort? [Solved]

What am I missing in my heapify stage of heap sort algo? First index should hold the maximum value after heapifying stage but it doesn't happens in my case , any help is appreciated Edit:by mistake I was checking for if a[left]>a[index] tho it should be a[left]>a[largest]

6th Oct 2020, 1:07 PM
Abhay - avatar
2 ответов
+ 1 I think this will help
6th Oct 2020, 7:54 PM
Adarsh Kunwar
Adarsh Kunwar - avatar
8th Oct 2020, 11:14 AM
Abhay - avatar