UST interview question

find duplicates in a string