Genpact interview question

WAP to remove the duplicated from an array