Count Distinct Substrings Leetcode Rating