TikTok Interview Question

How does a trie work