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.
There is one way to make change for
0
, which is to give back0
.4th test, why on earth is it 1 and not 0?
count_change(0, [1,2]) # => 1
Am I missing something?
This comment is hidden because it contains spoiler information about the solution
The tests should be changed and/or lessened, or the recursion tag should be removed from the question.
I timed out the first time I tried a recursive solution in python and the second time I got an error because I exceeded the maximum recursion depth (the money was over 5000 and there was a coin with value 1).
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.
This kata is about 5 kyu in my opnion
im late, but nice!
CoffeeScript fork
Adds random tests and switches assertions to chai.
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.Had a fun time with this kata! Thank's for making it!
Nice kata. I had to look up the solution, but it's a very nice algorithm to add to the toolbox.
C# solution
I'm trying to remove an element from an array using both, array.RemoveAt(index) and array.ToList().RemoveAt(0).ToArray() but both methods give me the following error : 'int[]' does not contain a definition for 'RemoveAt' and no accessible extension method 'RemoveAt' accepting a first argument of type 'int[]' could be found (are you missing a using directive or an assembly reference?
Any ideas as to what I'm doing wrong?
Can any one tell me why my code required increasing recursion limit to pass all test while many other recursive solution didn't? Really looking forward to the answer.
Great Kata, Thanks leakymirror
Loading more items...