Count Unique Substring Leetcode Javascript Questions