Solution like
return [1]
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.
Second parameter is always greater than 1.
But the example testcase:Test.assert_equals(separate(5, 1), [[1, 1, 1, 1, 1]])
Test.assert_equals(separate(5, 1), [[1, 1, 1, 1, 1]])
Loading collection data...
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]])