Maximum Subarray
Problem
Given an integer array nums, return the largest sum of any nonempty contiguous subarray.
The subarray must be contiguous and contain at least one element; an empty subarray is not allowe...
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:
