Maximum Subarray Leetcode Python Solution