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.
Anyway, thinking about it a little bit, considering random strings of English characters, if a character is repeated then on average you'll have to check 26 characters working backwards from the end of the string before you find a repeated instance of it. So unless you're working against a malevolent entity who is using all the unicode characters against you, a solution that uses indexOf and skips characters it already found dupes of is probably best. But this was fun as an exercise.
Aw man, I just realised I have an indexOf inside a loop. That's immediately O(n^2) D: