Pregunta de entrevista de Palantir Technologies

Question where I had to use a union set algorithm