Question d’entretien chez InstaWP

Write a program to collect duplicates in a string.