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.
Fixed.
Yep, I think that any integer returned passes all the tests O.o
As far as I understand the solution, we are trying so find the maximum negative value (m) substracted from the sum of s so far (and m can't be higher than 0), and the max value will be the max between sum of all the elements so far, or sum of the elements without maximum negative value.
But, yes, the solution is quite difficult to visualise.