Pregunta de entrevista de DevRev

Code to get duplicates from an array.?