TikTok interview question

How does a trie work