Pregunta de entrevista de Apple

Find repeated elements. Find intersection of 2 sets.