diff --git a/problems/0053.最大子序和.md b/problems/0053.最大子序和.md index b8a9d748..e3d9bc62 100644 --- a/problems/0053.最大子序和.md +++ b/problems/0053.最大子序和.md @@ -145,7 +145,29 @@ Python: Go: +```Go +func maxSubArray(nums []int) int { + if len(nums)<1{ + return 0 + } + dp:=make([]int,len(nums)) + result:=nums[0] + dp[0]=nums[0] + for i:=1;ib{ + return a + }else{ + return b + } +} +```