Pregunta de entrevista de Palantir Technologies

Coding question involved a set and hashmap.