A divergence of trie. While some solution uses Trienode, it may be too slow and a simple dictionary could work.
Description