Pregunta de entrevista de Chevron

Write code to find duplicates in an array.