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.
How does it work?
Because the range stop is equal to the length of the input string rather than the length of the input string plus an underline character, and the range step is 2. Suppose you had the even-length string "abcdef" -- no matter how many characters you added to the end of it, with a range stop of 6 and step of 2, i is going to loop through 0, 2, and 4 only.
if if the original string is even, then the added '_' is outside of
the range we check
This comment is hidden because it contains spoiler information about the solution