Zocdoc Interview Question

write a function to find duplicates in array