There is an array containing both +ve and -ve numbers. Can you write an algo/prog to find the subarray having the maximum sum ?
For eg :-
12, 32, -154, 50 , 60 , 888, -10000, 3
In this array, the subarray which has the maximum sum is 50,60,888.
My only solution is a brute force approach...Check out the comment for my ans.