Find the contiguous subarray with the largest sum (Kadane's algorithm). Variant **#12**.
Example 1
Input: nums = [2,3,-3,-2,-1]
Output: 5
Constraints
Acceptance: 60% · Topics: array, dynamic-programming
← All practice problems