Question d’entretien chez IBM

How would you remove duplicates from an infinitely long string?