Genpact Interview Question

WAP to remove the duplicated from an array