Domanda di colloquio di TikTok

Self introduction, then solve a dictionary tree problem. I solved it with trie.