buildHeap analysis, heapSort
Proof of solution to the recurrence:
Thm: buildHeap on an array of size \(n\)
runs in time ________.
Time is proportional to the sum of the
heights of all the nodes. Call it \(S(h)\).
\(S(h) =\)
\(S(0) =\)
Soln \(S(h) =\)
But running times are reported in terms of \(n\), the number of nodes…
1
2
3
Running time?
Why do we need another sorting algorithm?
CPSC 221