Ciena interview question

Remove elements that are not duplicate in an array