FDM Group interview question

How to find the duplicate in the String?