class Solution: def maxSubArray(self, nums: List[int]) -> int: ans = min(nums) count = 0 for i in nums: count+=i if count>ans: ans=count if count<0: count=0 return ans
点赞 评论

相关推荐

头像
05-16 11:16
已编辑
东华理工大学 Java
牛客737698141号:盲猜几十人小公司,庙小妖风大,咋不叫她去4️⃣呢😁
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务