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
Sorry for the slow response. Please see my answer to bonhart67 👍
Nice! I'm no guru on regex and hadn't been able to identify what was going wrong. You've helped me learn something, so cheers for that : )
Seems as though something's not quite right here. For example, the code results in "07.1.1.1" being valid, but "08.1.1.1" is not.
"127.0.0.1" is not valid either, although that could be blamed on the poor quality of the description and test cases given for the exercise.
The set of test cases for this kata need tightening up. I've found a number of published solutions that should not have been allowed to pass.
one C# solution, which has been marked up as being 'clever', even fails to pass the simple test [25, 50] => "YES".
Another published solution I found doesn't take into account the instruction to "sell the tickets strictly in the order people follow in the line" and fails the test [25, 25, 25, 100, 50, 50, 100, 25] => "NO".
Kata validation tests should properly reflect all given requirements.
This code fails for even the simplest test: [25, 50] => YES
The set of test cases needs fixing on this kata!