Prowareness Interview Question

Asked to write the code duplicate elements in an array