Python Subarray Leetcode Problem Set 7