This kata is now one year old and was created from nothing. As for the one you pasted, I do not know its creation date but based on the comments it seems younger.

I'm pretty sure your random 500-item test case is broken. Both my optimized linear-time implementation and a slow quadratic-time implementation give me the same answer, which is orders of magnitude smaller than the answer you have as correct.

In fact, the answer you're giving seems to be consistently larger than the sum of all of the positive elements of the array, which is impossible.

Also, your example in the explanation is a little weirdly formatted, so it looks like it's saying that (7 + -10 + 19) = 24.

But I didn't undertand, whywe from this array [3, -4, 8, 7, -10, 19, -3] have had this one [8. 7, -10. 19]?

And still unfair. :P

Do that in your solution. It's called debugging.

Publication date is on the description page.

This kata was first. Closing.

Add input to the error output

Already raised.

This is a duplicate of https://www.codewars.com/kata/maximum-subarray-sum

Java: https://www.codewars.com/kumite/5c8544bf20089d43765a815c?sel=5c8544bf20089d43765a815c

Please Review and Accept.In the description you said:

but your tests are very simple and not really test the efficiency of the algorithm!

Right, I just updated the text. Thanks!

It was not clear that the result should be a

positivesum. I think you should add this to the kata description.I was judging based on the number of completions and upvotes.

This kata is now one year old and was created from nothing. As for the one you pasted, I do not know its creation date but based on the comments it seems younger.

This is a dupe of http://www.codewars.com/kata/maximum-subarray-sum

I'm pretty sure your random 500-item test case is broken. Both my optimized linear-time implementation and a slow quadratic-time implementation give me the same answer, which is orders of magnitude smaller than the answer you have as correct.

In fact, the answer you're giving seems to be consistently larger than the sum of all of the positive elements of the array, which is impossible.

Also, your example in the explanation is a little weirdly formatted, so it looks like it's saying that (7 + -10 + 19) = 24.

## Loading more items...