The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
81 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 (9.6k points)
closed by | 81 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 (9.6k 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
48,756 questions
52,850 answers
183,548 comments
68,744 users