Maximum Subarray Sum Leetcode Solution Python