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.
You are right and you should mark your reply as ISSUE because it is surely broken. In the example which you have posted I hace found this as the greatest sum subsequence
[13, -2, 25, 21, 29, 23, -7, -8, 22, 14, 23, -23, 11, 25, 30, 14]
whichhives sum of210
. And 0 should be returned only if the list is made up of only negative numbers or is empty.Because [4, -1, 2, 1] is the subsequence with the greatest sum (6) in [-2, 1, -3, 4, -1, 2, 1, -5, 4].
Any other subsequenc would have lower sum than that for example
So you have to find the subsequence of any length that produces the greatest sum.
You have probably wrong condition for handling input value and you are throwing extra Exceptions when it is not intended.
That was my problem - I've looked up the condition and turned out that in one extra case I threw an exception.