Domanda di colloquio di Whatnot

Data Structures/Algo - Trie based problem. I would rate it LC Medium/Hard