Given an integer array nums, return the maximum sum of any non-empty contiguous subarray. The goal is to do better than checking all possible subarrays.
Constraints
1 <= len(nums) <= 10^5
-10^4 <= nums[i] <= 10^4
Subarray must be non-empty
Interviewer
Whenever you're ready, walk me through your approach or go straight to the code. The requirements are in the Question tab.