Interview Coder drill
Interview Coder drill
Interview Coder drill
20:00
Given an integer array nums, find the subarray with the largest sum, and print its sum.
Example 1
Input: nums = [-2,1,-3,4,-1,2,1,-5,4]
Output: 6
Subarray [4,-1,2,1] has the largest sum = 6
Constraints
Capture your plan, then rate how clearly you recalled it before submitting.