The Gateway to Computer Science Excellence
0 votes
287 views


Please explain how heapsort will give us best results?

in Programming by Active (3.5k points) | 287 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 Veteran (60.4k points)
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
50,650 questions
56,194 answers
193,988 comments
94,866 users