Added code for finding duplicates in a String