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.
This comment is hidden because it contains spoiler information about the solution
This one was tough! And it was worth it! Thank you for coming up with such a nice idea!
'refb l miq hj ko n g p a c d '
This test and some other tests fail because of the ORDER of the elements in the resulting array. But according to the description of the kata the order should not be taken into account!
The fail message is that the test expects the first element to be 'g', but my code makes it a 'c', which is correct too and it's just the second element in the tests, not the first like I have it.
PS: To make the tests order-insensitive you could use this code instead:
assertThat(LoneChar.loneliest("refb l miq hj ko n g p a c d ")).containsExactlyInAnyOrder('g', 'c');
That's just my two cents but I was tought that it's better to use only one return statement and a variable that you'll return in the very end :)