Pregunta de entrevista de Accenture

get the duplicate elements from the array?