I have a question about a specific amortized accounting algorithm and to be specific the variant with Reset operation.First, 9th line of increment sets $\max[A]$ to -1 if $i \le \max[A]$  because for example going from 100 to 101 would set $\max[A]$ to $-1$ which does not make much sense.Then, if max[A] increases place 1 dollar as a credit on a new high-order 1. - when the high-order 1 has been set, 2 coins were given for this operation in increment - one for actually setting the bit to 1 and one for for the future, hence eventual reset to 0 would be covered by it. Why do we need to put yet another coin?
Amortized analysis of binary counter with increment and resetting operations
algorithms;algorithm analysis;amortized analysis