Advertisement
yuntai

Untitled

May 29th, 2019
551
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.15 KB | None | 0 0
  1. class Solution:
  2.     def maxSubArray(self, nums: List[int]) -> int:
  3.         return max(itertools.accumulate(nums, lambda x, y: x+y if x > 0 else y))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement