Contiguous Array Leetcode Question