Count Distinct Substrings Leetcode 754