Pregunta de entrevista de Sendoso

I was asked to write a string character counting code.