Virtusa Interview Question

Write a program to print duplicates in a string