Maximum Good Subarray Sum Leetcode