Virtusa Interview Question

duplicate elements in a string in java spy number program in java