Maximum Good Subarray Sum Leetcode 1501