Max Subarray Sum Problem Leetcode Solutions Extensions