Maximum Subarray Sum: find the contiguous subarray with the largest sum
Asked in the Round 2 stage. Solve it with Kadane’s algorithm.
Implement max_subarray_sum(nums), which receives an array of integers and returns the largest possible sum of a non-empty contiguous subarray.
def max_subarray_sum(nums):