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.
I enjoyed solving this kata. In the future you should add testing the end of the game logic, including extra innings. Thanks.
The instructions indicate that the input will only contain alphanumeric characters (0-9, a-z, A-Z), however the sample test cases have non-alphanumeric characters within them, for example: space, semi-colon, apostrophe, and backslash:
Assert::That(duplicateCount(" "), Equals(0));
Assert::That(duplicateCount("asdfghjkl;'\"), Equals(0));
Assert::That(duplicateCount("asdfghjkl;'\'"), Equals(1));
And even if I ignore the non-alphanumeric characters, the "Assert::That(duplicateCount("asdfghjkl;'\'"), Equals(1));" is counting the two apostrophes as a match.