Maximum Subarray
Try to solve the Maximum Subarray problem.
We'll cover the following
Statement
Given an integer array, nums
, find the contiguous subarray that has the largest sum and return its sum.
Note: A subarray is a contiguous part of an array that contains at least one number.
Constraints:
-
nums.length
-
nums[i]
Examples
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.