Count Distinct Substrings Leetcode Problems Two