Javascript Check If Array Contains Subarray Leetcode Problem