Infosys Interview Question

How to find duplicate element in array?