Amortized Analysis
Aggregate analysis
a sequence of nnn operations takes worst-case time T(n)T(n)T(n) int total. In the worst-case, the average cost, or amortized cost, per operation is T(n)/nT(n)/nT(n)/n.
example: stack with MultiPop(int k, Stack S)
Accounting method
When an operation’s amortized cost is...
more...







