This is from IARCS Problem archive (DEVIOUS). Given a sequence of integers, how do you find the contiguous substring with the absolute value of the sum of its numbers being minimum? Is it even DP? How do you relate it to smaller subproblems? asked 04 Jan '15, 19:14

Thanks, but I don't think that applies here. answered 05 Jan '15, 18:53

It turns out it's not even DP! http://stackoverflow.com/questions/16996221/closesttozeroabsolutevaluesumofconsecutivesubsequenceofasequenceof answered 05 Jan '15, 18:58

Iterate from left to right and store the max possible sum if you include that particular integer.