Pergunta de entrevista da empresa Chargebee

String manipulation like count repeated char in string