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.
The reference solution incorrectly handles too many decimals (the result of the last test is always wrong).
Too few random tests.
NUMERALS
should be explicitly provided to the user, and not hidden in the preloaded.Reference solution should be a part of the fixture.
I added extra cases that the previous solution would fail for:
Awesome thanks!
Thanks for your feedback. I've added some randomized tests. Tell me what you think of it.
Thanks! If you don't mind, please provide more test cases, with some randomized. I know that this is a exact translation of whats already there, but this is an old kata and the existing test suite is not nearly complete enough.
On top of the least candidates, candidates that received no votes at all should also be removed.
Also I didn't have to manage the complete tie.