The counter solution simply needs to check that the counter is non-zero before decrementing.
All cases then work perfectly.
The counter solution simply needs to check that the counter is non-zero before decrementing.
All cases then work perfectly.