Infosys Interview Question

find duplicates from an array