Maximum Subarray
Given a nonempty integer array nums, find a nonempty contiguous subarray with the largest sum and return that sum.
Input and Output
- Input: a JSON object containing the integer array
nums. -...
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Standard Input
Execution Result:
