Leetcode Maximum Good Subarray Sum Problem