Deloitte interview question

find duplicate in an array