连续子数组的最大和

class Solution:
    def FindGreatestSumOfSubArray(self, array):
        if not array:
            return 0
        rest = []
        for i in range(len(array)):
            sum = array[i]
            rest.append(sum)
            for j in range(i+1,len(array)):
                sum += array[j]
                rest.append(sum)
        rest.sort()
        return rest[-1]

编程技巧