Consider the following algorithm for Time Complexity of building a heap of an input array A.
[ad type=”banner”]What is the worst case time complexity of the above algo?
Although the worst case complexity looks like O(nLogn), upper bound of time complexity is O(n). See following links for the proof of time complexity.
nice and easy to understand