Maventic interview question

Count the identical characters in String