Find Subsequences Leetcode Javascript