Python Subarray Leetcode Problem 543