def FindGreatestSumOfSubArray(dataList):
    summax = dataList[0]
    amax = dataList[0]
    for num in dataList[1:]:
        amax = max(amax + num, num)
        summax = max(amax, summax)
    return summax
DP 方法的最大子数组,简洁一些