Pergunta de entrevista da empresa Block

Coding round on coder pad with 5 parts question. Like leetcode. Something about probability and next word.