Maximum sum subarray
Ref: http://www.geeksforgeeks.org/largest-sum-contiguous-subarray/

Notes:
Algorithm doesn't work for all negative numbers. It simply returns 0 if all numbers are negative. For handling this we can add an extra phase before actual implementation. The phase will look if all numbers are negative, if they are it will return maximum of them (or smallest in terms of absolute value).
Last updated
Was this helpful?