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.
Why is the default parameter
memo
given in the function definition since it's never used/required?Integers in the sequence can only be used once in the sum
. What if the list contains duplicates? If1
is contained two times in the list, how many times can we use it? Or can this not happen?Testing is very much incomplete. My solution tests for a combination of exactly two ( possibly the same ) elements to add up to the target, but passes.
The description clearly specifies any combination of sequence elements, so
0
or more, without reusing elements. ( This follows from the definition of "combination". )This just screams optimisation. However, testing poses no performance requirements at all.
Either just don't mention elements will be sequential ( also, "sequential" is not the correct word - the elements are ( strictly ) "increasing" ), or force solvers to actually use this property of the input. Or, the only option really, unpubish this duplicate ( see below ).
This kata is a duplicate. Please unpublish it.
https://docs.codewars.com/authoring/tutorials/create-first-kata/
This comment is hidden because it contains spoiler information about the solution