Question d’entretien chez Zocdoc

write a function to find duplicates in array