Lecture 23
Learning objectives
After this class, you should be able to:
- Given an array of data, organize them as a heap using the
O(n)
time algorithm discussed in class.- Prove that the heap initialization algorithm discussed in class has time complexity
O(n)
.
Reading assignment
- Sec 6.9.2, class notes.
Exercises and review questions
- Exercises and review questions on current lecture's material
- Organize the array in figure 6.58 (a) as a min-heap, using the
O(n)
time algorithm discussed in class. Show all steps.- Derive an expression for
Sumk=0Infinity k2 xk
.- Use integration to derive a bound for for
Sumk=1Infinity k xk
.- Questions on next lecture's material
- None.
Last modified: 1 Apr 2008