Continuous Subarrays Leetcode Solution Extension