FDM Group Interview Question

How to find the duplicate in the String?