Visa Inc. interview question

check for duplicates characters in a string