Why it matters
Aggregate method is simplest. Understanding shapes analysis.
Advertisement
The architecture
Bound worst-case total for n ops.
Divide by n = amortized per op.
All ops same amortized cost.
Advertisement
How it works end to end
Simple + coarse.
All ops same amortized cost.
Stack of k pushes + one costly pop_all.