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.
No.
If either argument is greater than stringName.length, it is treated as if it were stringName.length.
EDIT: Just ignore that. I thought you were talking about JS not Java xD.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The writer of the kata explicitly said not to use encode. You really should not have used it.
8 kyu kata are supposed to be for complete beginners. The replace method isn't taught to beginners.
This comment is hidden because it contains spoiler information about the solution
I am not 100% sure because of the spacing, but I think that if you set "a" to "len(x)" then "a > len(x)" will always be false. This means that your code will be returning the length of the last word as the if statement will never be evaluated.