Challenge 11: Find the Sum of Maximum Sum Subarray

Try to solve the Maximum Subarray problem.

We'll cover the following

Statement

Given an unsorted array nums, find the sum of the maximum sum subarray. The maximum sum subarray is an array of contiguous elements in nums for which the sum of the elements is maximum.

Constraints:

  • 11 \leq nums.length 103\leq 10^3

  • 104-10^4 \leq nums[i] 104\leq 10^4

Examples