Skip to content

Latest commit

 

History

History
8 lines (8 loc) · 290 Bytes

File metadata and controls

8 lines (8 loc) · 290 Bytes

Banker's method

  • Charge extra for cheap operation
  • Save extra charge as tokens in your data structure
  • Use the tokens to pay for expensive operations

Dynamic array

  • Charge $3 or each insertion
  • The actual cost for insertion is $1, extra $2 is charged for future big operation