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

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 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
187,341 comments
71,060 users