Two Subarrays Leetcode Python Questions