takeUforward
number-of-distinct-substrings-in-a-string-using-trie - Tutorial