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
Why was double used as opposed to long? My solution is valid in my opinion, but because jitter can creep into a floating point number over multiple operations, sometimes it fails the random test.
I suggest modifying the second given example to be more different in the appearance count from the first example to cut down on the chance the reader leaves with the idea that the character string is only valid if every character appears twice.
Example modification:
"abcabcab" is NOT a valid word because 'a' appears thrice, 'b' appears thrice, but 'c' only appears twice!
Because C89