Question d’entretien chez Apple

Remove duplicates with best time complexity