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.
maybe.
If you are iterating the string from the begining, yes.
If I am not wrong, indexOf returns the position of the first elemene
Not when the letters repeat.
I know this is old but isn't
str.indexOf(str[i])
justi
? I mean you already know the index.Now, that's clever!