SADA interview question

Trie data structure coding question