next up previous
Next: Up: Previous:

Accounting Method

TableInsert cost should be 3. This cost pays for:

If m = size[T] after expanding, then num[T] = m/2 and no credit.

Charge $3 per Insert.

Insert costs $1 ($2 left).

For m/2 items, m/2 credit for new items + m/2 credit for existing items.


next up previous
Next: Up: Previous: