Two Subarrays Leetcode Python Problems