Pregunta de entrevista de Splunk

Data structures question that was equivalent to leetcode medium