Pregunta de entrevista de Curriculum Associates

Given an array, get all of duplicate elements in the array.