Guest User

Untitled

a guest
Aug 25th, 2019
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Solution(object):
  2.     def maxSubArray(self, nums):
  3.         """
  4.        :type nums: List[int]
  5.        :rtype: int
  6.        """
  7.         for i in range(1, len(nums)):
  8.             if nums[i-1] >0:
  9.                 nums[i] = nums[i] + nums[i-1]
  10.         return max(nums)
RAW Paste Data