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.
It works like that, because I calculate fitness on the first step of each iteration (based on the previous population).
This kata is strictly about the algorithm, not some language features. Hence - why not? You're very welcome to translate it to Java :)
Is the java version of this relevant?? I was thinking about contributing...There are very few questions for java on codewars
I didn't want to multiply the answers "Not applicable"... The case 'array size zero' is already in the case m1 * ... * mk must be greater that the number n to decompose.
Furthermore I don't think katas are there to test a lot of possible errors but rather to encourage algorithms knowledge and discover of language features:-)
Have a good day!
Nice kata, interesting without being too difficult for me.
You should also have a test case for array size zero in kata test cases
When you are doing population=newPopulation,Shouldn't you also update fitnesses as fitnesses=newFitnesses by generating fitnesses again??