Subsequence And Subarray Javascript Interview Programming