Pregunta de entrevista de Anonyme

string repeated element and count of repeatation