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.
Solution like
passed.
Trivial duplicate of https://www.codewars.com/kata/555b1890a75b930e63000023
Added random tests and updated description about the order of the subarray and array!
Added random tests!
I only fixed about "Second parameter is always greater than 1."
Not yet random tests and clarification of the order of subarray.
Thank you very much for suggestion!!
Thank you! I fexed it.
Note that we already have lots of katas about partitions:
https://www.codewars.com/kata/getting-along-with-integer-partitions
https://www.codewars.com/kata/number-of-integer-partitions
https://www.codewars.com/kata/explosive-sum
So:
Needs random tests
And, kata needs random tests.
And, you need to clarify the order of subarray in the description.
But the example testcase:
Test.assert_equals(separate(5, 1), [[1, 1, 1, 1, 1]])