edited by
966 views
2 votes
2 votes

edited by

1 Answer

0 votes
0 votes
construction of build heap it will take  n comparisons{minheap}

after that you have to delete root element for minimum(you have to replace root will last element of tree it will take log(n) time to maintain heap property ).you have to delete three element it will take time more than 3*log(n).thats why it will take in ans O(LOG(N))

 so Total comparisons = N+O(log(n))

in question is not asking for time complexity( in this case ans will be C ).

Related questions

4 votes
4 votes
4 answers
1
Aibi asked Oct 8, 2017
2,584 views
Consider bottom-up merge sort working on 'n' elements. Assume 'n' is a power of 2. The minimum number of comparisons in order to get sorted list is(A) (n log n) / 2(B) n ...
0 votes
0 votes
1 answer
2
Ayush Upadhyaya asked Mar 8, 2017
611 views
The tightest lower bound on the number of comparisons, in worst case for comparison based sorting is of the order of ?(A)$n$(B)$n^2$(C)$nlogn$(D)$n \space{log\space n}^2$...
0 votes
0 votes
1 answer
3