The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
0 votes

I've read and been told that Heapsort can only be applied on Max heap, but this article for G4G states otherwise -


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

closed with the note: resolved :)
asked in Algorithms by Loyal (7.9k points)
closed by | 100 views

1 Answer

0 votes
Yes, it can be applied on Min heap and the output sorted array will be in descending order.
answered by Loyal (7.9k points)

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,532 questions
54,136 answers
71,060 users