Sollicitatievraag bij AnaVation

Given a string, how would you check for duplicates efficiently.