Publicis Sapient Interview Question

1.WAP to find the duplicate element in array.