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.
63 = 21 x 3, it is even explained in the kata's description, last example.
Hi, and thanks for this kata.
The fourth basic test seems to be wrong: "[1, 5, 10, 21, 25], 63), 3)"! --> sum([1, 5, 10, 21, 25]) == 62,
so it's not possible to reach 63, so it woulds return 0 and not 3
My bad :(
I didn't understand we could use the same coin more than one time.
So there is not issue!
Opps, error in my test code for static fail message. I have fixed it. Thank you for reporting this.
Something wrong with the tests or the checker function:
The min coins problem is commonly presented with the 1 cent coin in the list and dynamic programming algotithms are used to solve them. But I have found that some students have a hard time modifing the original algorthm to work with variations if they are weak at problem solving and good at just plugging in the textbook solution. Perhaps this variation does belong to an easier level of kyu.
Oh, that's a remarkable difference...
that kata always has a solution since it always has a coin with value 1
i have now fixed this in the description. thank you.
Description:
Example, a few lines below:
Looks like a duplicate of this kata:
https://www.codewars.com/kata/5365c93f8d004c94c90002e7
WOW, thank you. You found a edge case that I needed to change in my orginal solution. Try it now, I fixed it.
Loading more items...