Analyzing Heapify(): Formal
So we have
T(n) ? T(2n/3) + ?(1)
By case 2 of the Master Theorem,
T(n) = O(lg n)
Thus, Heapify() takes linear time
Previous slide
Next slide
Back to first slide
View graphic version