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.
Last 'if" is obviously redundant. Check other solutions of this kind
Last 'if" is obviously redundant. Check other solutions of this kind
Still not solved for Go version
What is definition of "subarray" is it like "subsequence" in math? In this case most of solutions are wrong as they assume that "subarray" starts from first element of the array, but it can be not the case. For [-1, 2] result should be 2 and not 1 as maximum sum is for subarray that consists of second element skipping the first.