0
$\begingroup$

enter image description here

The Question is as given above. In this answer: https://stackoverflow.com/questions/9755721/how-can-building-a-heap-be-on-time-complexity, I note that the building a heap is already O(n) complexity, and have designed an algorithm with such time complexity as well. How does the fact that the array is sorted in increasing order improve this algorithm?

Any help would be greatly appreciated. Thanks.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.