DP for finding the max sum of sub array.