Two Subarrays Leetcode Javascript 30