Checkpoint 9.6.1.
The solution above is correct, but not very efficient. Can you think of a solution that does not require iteration? Try writing a more efficient version of
increment
in the commented section of this active code. If you get stuck, you can reveal the extra problem at the end for help.