Bose Interview Question

Write codes to detect the duplicate letter in a string