Cogito Interview Question

Find Duplicates in the given String