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.
Can't upvote that enough. Thanks jmeek
Apparently, the logic is that your algorithm is supposed to collect the names of all candidates before checking vote totals. Therefore :c would have been eliminated in the first round because :c recieved 0 votes.
I agree that the last test case is faultly. If you look at the raw data and follow the requirements, 'c' is the winner instead of 'e'.
The random testcase has a lot of problems
same to you...
[[["a", "c", "b", "d", "e"],
["d", "c", "a", "b", "e"],
["e", "b", "d", "a", "c"],
["e", "a", "b", "c", "d"],
["b", "c", "e", "a", "d"]],
"e"],
i think this is not right