Introduction to amortized analysis