Search⌘ K
AI Features

Maximum Subarray

Maximum Subarray asks you to find the contiguous part of an integer array with the greatest possible sum and return that sum, even when values are negative.

Statement

Given an integer array, nums, find the contiguous subarray that has the largest sum and return its ...