Infanion interview question

count duplicate character in a string