Pregunta de entrevista de Google

Remove duplicates in a list. Optimize time complexity.