Pergunta de entrevista da empresa Whatnot

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