Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
So in the description, when you write:
"The equation could be stated as follows:
Johnny runs down the row of lockers n times, starting at the first locker each run and skipping i lockers as he runs, where n is the number of lockers there are in total and i is the current run."
you actually mean:
" ... starting at the ith locker each run and skipping i lockers as he runs ... "
You really need to change the description. Perhaps you mean "start skipping locker numbers" at the first locker, but most native english speakers would interpret your words as "start flipping lockers" at the first locker. Also, you need to specify that all the lockers start out closed!
Because there is an edge condition that loops forever on your first
while
loop.(I don't know why your Sublime isn't looping forever on this.)
Why is locker 3 being affected at the second run? It goes:
First run
1-2-3-4-5...
Second run
2-4-6-8-10...
Third run
3-6-9...