Infosys interview question

How to find duplicate element in array?