Bose interview question

Write codes to detect the duplicate letter in a string