Maximum subarray sum using an updated version of Kadane's algorithm.
Asked in the Round 1 stage. DSA round.
Given an integer array nums, return the maximum sum of any non-empty contiguous subarray. Use an updated version of Kadane's algorithm.
def max_subarray_sum(nums):
nums: a list of integersdef max_subarray_sum(nums):