Given an array of integers `nums`, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum.
Explanation: The contiguous subarray [4, -1, 2, 1] has the largest sum = 6.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak