A method to collect Amortized Time.

Method

  1. Sum the Worst Case Costs for each operation
  2. Examine if any operations depend on each other and simplify
  3. Divide total cost by # of operations

Example

Data structure where the -th operation costs if it is an exact power of 2, otherwise. Find aggregate cost per operation. Soln:

  • Then, aggregate cost is