MSD interview question

Q: How to remove duplicates from the collection?