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 C++ tests are much tougher than e.g. the C tests. I just tried it: A simple C solution that easily passes the C tests times out on the C++ tests. A bit unfair, I'd say. Either the C tests are too easy, or the C++ tests are too hard. I don't know which...
This comment is hidden because it contains spoiler information about the solution
Tried solving this kata in c++
I got 4 different solutions working but none were fast enough
The discription does not mention any speed requirement so running into a "your code ran for to long" after every time i was able to finish a new version of my algoritm was super demoralizying since each did logically work.
Please update the description of this test to mention the speed requirement, or just reduce the amount of tests in the c++ code challange.
Side note, solutions that work for other languages dont for c++ due to this speed requirement.
The kata needs random tests.
The kata design should follow proper coding practice. It should either be
new Condorcet(votes1).winner()
, or (more appropriately) justcondorcetWinner(votes1)
, since there is no need to put a class around a stateless function.Condorcet(votes1).winner()
is not a valid design.wtf, i have a recursive solution that works but its mega-slow. how am i supposed to do this without recursion? is it some maths thing that you just have to know?
C# need random tests
Scala translation
Follows the test spec of the new Python fork.
In the description, it says that the
Condorcet
function should return an object with a.winner()
method, evaluating to whoever won the election. It also says that when there is no winner, "the function should returnnull
." This is ambiguous, and I feel it should be clarified that.winner()
is expected to return null.Issue below is not fixed.
Ruby translation
As somebody else mentioned below, Clojure reference solution for the random tests gives the wrong answer for
change = 0
.Also, Haskell random tests is too weak.
Needs a test where
change = 0
.This comment is hidden because it contains spoiler information about the solution
In the requirements:
I could pass the tests without doing the elimination round. Here's a test that does make sure elimination takes place:
Loading more items...