Pergunta de entrevista da empresa Trello

Probability of string occurrence from a passage.