Count Distinct Substrings Leetcode Contest Questions