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.
Check the condition in your for loop again.
Yup. Note the second
for
-loop. It's not optimized, though. Depending on the string's length, sorting and a single iteration could be faster (O(n log n) vs O(n²)).It's not checking only letters next to each other. For each letter, it checks the rest of the letters of the word to find a matching one.
This comment is hidden because it contains spoiler information about the solution