Virtusa interview question

Write a program to print duplicates in a string