Count Distinct Substrings Leetcode 15010