Python: Kadane's Algorithm with DP
\'\'\'\nclass Solution(object): \n    def maximumSum(self, arr): \n     \n        tmp_max=[arr[0],arr[0]]\n\t\t##  tmp_max[0]: with no deletion\n\t\t##  tmp_max
\'\'\'\nclass Solution(object): \n    def maximumSum(self, arr): \n     \n        tmp_max=[arr[0],arr[0]]\n\t\t##  tmp_max[0]: with no deletion\n\t\t##  tmp_max[1]: delete one negative num\n        global_max=arr[0]\n        for i in range(1,len(arr)):\n            a=tmp_max[0]\n            tmp_max[0]=max(tmp_max[0]+arr[i],arr[i])\n            if arr[i]<0:\n                tmp_max[1]=max(a,tmp_max[1]+arr[i])\n            else:\n                tmp_max[1]=tmp_max[1]+arr[i]\n            \n            global_max=max(global_max,tmp_max[0],tmp_max[1])\n        return global_max\n\n\'\'\'
[]