Pregunta de entrevista de Deloitte

Live coding problem: Character occurence in a string.