Motadata interview question

Return duplicate elements in the array