Meta interview question

Preprocess dictionary as trie tree