Pregunta de entrevista de UnitedHealth Group

write program with best complexity for finding duplicates in an array