amortized complexity