Subsequence And Subarray Javascript Interview Bit