You are given an integer array nums.
Your task is to find the maximum possible sum of any contiguous subarray within nums.
Return this maximum sum value.
Input: nums = [-3, 2, -1, 4, -2, 2]
Output: 5
Explanation:
The subarray [2, -1, 4] has the largest sum 5.
Input: nums = [8, -1, 3, 4]
Output: 14
Explanation:
The subarray [8, -1, 3, 4] gives the sum 14.
Input: nums = [-5, -2, -3]
Output: -2
Explanation:
The subarray [-2] has the maximum sum -2.
Accepted:
Submission: