Google Interview Question

Remove duplicates in a list. Optimize time complexity.