maxSubArray with the dynimic programming method.