Pregunta de entrevista de AssemblyAI

Coding interview: a LeetCode medium problem, easily solved with the right data structure