Maximum Subarray
Medium
Greedy
Grind 75NeetCode 150
Given an integer array nums, find the subarray with the largest sum, and return its sum.

Constraints:

  • 1 <= nums.length <= 105
  • -104 <= nums[i] <= 104