Google interview question

Remove duplicates in a list. Optimize time complexity.