Cogito interview question

Find Duplicates in the given String