Trie LeetCode 1698. Number of Distinct Substrings in a String Solution in Java, C++, Python & Go | Explanation + Code CoderIndeed June 12, 2026