Domanda di colloquio di Apple

Find repeated elements. Find intersection of 2 sets.