Wealthsimple interview question

Build a trie.