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.
|| is the OR operand. So if the first case passes (in this case i == 0), then it will skip trying to validate the second case (str[i-1] == ' ').
Since i is always 0 on the loop's initialization, then it will never try to validate str[i-1] == ' ' on the first pass
how doesn't str[i-1] throw an error in the first pass? does it skip it because of the ||?
the int conversion i think is unnessesary. in go division returns the same type and in integer case it returns the quotient
This comment is hidden because it contains spoiler information about the solution