Domanda di colloquio di InstaWP

Write a program to collect duplicates in a string.