Maximum Good Subarray Sum Leetcode Two