Meta interview question

how to find duplicates in an array