Prowareness interview question

Asked to write the code duplicate elements in an array