The Gateway to Computer Science Excellence
0 votes
335 views


Please explain how heapsort will give us best results?

in Programming by Active | 335 views

1 Answer

+1 vote
Best answer
Asymptotically both MERGE as well as HEAP sort both are correct.
but Constants involved in MERGE SORT (i.e. C*nlogn, C is constant ) is much much larger than Constant involved in HEAP SORT..
Practically HEAP SORT overcome MERGE SORT for very large array.
by Boss
selected by
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
52,215 questions
59,993 answers
201,194 comments
94,661 users