(self, nums: List[int])
| 4 | |
| 5 | class Solution: |
| 6 | def maxSubArray(self, nums: List[int]) -> int: |
| 7 | max_current = nums[0] |
| 8 | max_global = nums[0] |
| 9 | |
| 10 | for i in range(1, len(nums)): |
| 11 | max_current = max(nums[i], max_current + nums[i]) |
| 12 | if max_current > max_global: |
| 13 | max_global = max_current |
| 14 | |
| 15 | return max_global |
nothing calls this directly
no outgoing calls
no test coverage detected