>>13749946I hate code, but here my idea
>each sub array A, starting from original array-remove negative elements in front and back of array
-divide the array into 3 sub array: x-y-z with x have only positive elements, y only negative elements and have biggest size possible
-compare A, x, z to find array with biggest sum
-repeat the above procedure with subarray z
>terminatethe array have no negative element or is empty
>also If no positive element in array, simply get the biggest element