X Interview Question

looking up data in trie data structure.