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.
it took me 1 hour to get that, but at least i learned something^^
yeah, clean and understandable, but it has complexity O(n^2) instead of possible O(n)
it's a linear checking if the current sum is worth prolonging (that is if it's > 0), if not it will start a new sum from the current point