Chevron Interview Question

Write code to find duplicates in an array.