Review: Amortized Analysis
l To illustrate amortized analysis we examined
dynamic tables
1. Init table size m = 1
2. Insert elements until number n > m
3. Generate new table of size 2m
4. Reinsert old elements into new table
5. (back to step 2)
l What is the worst-case cost of an insert?
l What is the amortized cost of an insert?