676 views

1 Answer

Best answer
1 votes
1 votes
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.
selected by

Related questions

3 votes
3 votes
1 answer
1
Akriti sood asked Dec 26, 2016
1,011 views
Consider an array ‘A’ with 2m elements. The elements in odd position are sorted in non-increasing order that is A >= A[3] >= A[5]......A[2m-1] The elements in even p...
6 votes
6 votes
2 answers
3
radha gogia asked Jul 15, 2015
9,042 views
Assume that a CPU can process $10^8$ operations per second. Suppose you have to sort an array with $10^6$ elements. Which of the following is true? 1. Insertion sort will...
4 votes
4 votes
2 answers
4
worst_engineer asked Oct 7, 2015
6,067 views
In quick sort , for sorting n elements , the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. What will be the time complexity?it is $\Theta (...