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.
My hint is why do you need O(n^2) to solve the third example?
solve([2,3,2,3,4,2,12,3]) = 1
Tips for increasing speed? Right now I am finding all combinations of the initial array and then summing all the items of each combination. I expect finding all the combinations takes too much time but I don't know how I'd do it otherwise without missing anything.
How many of solvers manage to do it in better time then O(n^2)
Its so hard
Sweet !
Then print it with
Console.WriteLine
.c#. And it doesnt show me the input value. (maybe it does and i dont see it, im new to codewars)
Language? Hard to tell if you don't state the input value too. Print the input value if you don't know what it is.
Passing all test except of random, Which fails all the times. Is there a possible bug there?
Example for failed random test:
Test Failed
Expected: 54
But was: 50