Count Distinct Substrings Leetcode Contest Prediction