AnaVation interview question

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