SADA Interview Question

Trie data structure coding question