Salesforce interview question

How to find duplicate letters in a string