What is heap sort algorithm?
Loading
What is heap sort algorithm?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Rajanikant HawaldarPosted Nov 12, 2022, 3:10 PM
it divides its input into a sorted and an unsorted region, and it iteratively shrinks the unsorted region by extracting the largest element and moving that to the sorted region. It first removes the topmost item (the largest) and replace it with the rightmost leaf. The topmost item is stored in an array and Re-establish the heap.this is done until there are no more items left in the heap.
Elements Before Sorting :
2
5
1
10
6
9
3
7
4
8
Elements After Sorting :
1
2
3
4
5
6
7
8
9
10
Brahma Prakash ShuklaPosted Nov 12, 2022, 11:59 AM
https://www.google.com/amp/s/www.geeksforgeeks.org/heap-sort/amp/