Accenture interview question

get the duplicate elements from the array?