COP 4531: Lecture 7
Learning objectives
After this class, you should be able to:
- Given an algorithm, analyze its amortized time complexity using (i) the accounting method, and (ii) the potential method.
Reading assignment
- CLR: Sections 17.2 - 17.3.
- Review heaps from COP 4530 (CLR: Chapter 6, sections 6.1 - 6.3).
Exercises and review questions
- Questions on current lecture's material
- Exercise 17.2-1.
- Exercise 17.3-1.
- Questions on next lecture's material
- (Post your solution on the discussion board) Give an array of 6 integers, and show how
BUILD-MAX-HEAP
(page 133) will make it a heap. You may find it difficult to draw the tree representation, as in fig. 6.3, on blackboard. Instead, give the array representation for each step.