Count Distinct Substrings Leetcode 752