Whatnot Interview Question

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