closed by
697 views
0 votes
0 votes
closed with the note: resolved :)

I've read and been told that Heapsort can only be applied on Max heap, but this article for G4G states otherwise - https://www.geeksforgeeks.org/heap-sort-for-decreasing-order-using-min-heap/

 

So, is it true that HS can be applied also on Min heap?

closed by

1 Answer

0 votes
0 votes
Yes, it can be applied on Min heap and the output sorted array will be in descending order.

Related questions

0 votes
0 votes
0 answers
3
bts1jimin asked Sep 10, 2018
1,876 views
What is the number of comparisons required to extract 45th element of the min heap?
1 votes
1 votes
0 answers
4
Anjana Babu asked Jan 10, 2017
1,279 views
Please explain using images how to convert BST into max/min heap in-place .Please explain the complexity of doing so.