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
- Page 277-278: Floyd algorithm for initialization, 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
.
- Questions on next lecture's material
- None.
Last modified: 5 Nov 2004