As a complement to this answer for those not familiar with martingales.
What is the expected number of keystrokes (or "time") it would take a monkey to type the string $\small \text{ABRACADABRA}$?
Step-by-step intuitive solution light on math assumptions and notation.
To further clarify the problem, here is a quote from this online article:
The reader’s first idea might be to use the geometric distribution again. ABRACADABRA is eleven letters long, the probability of getting one letter right is $\frac{1}{26}$, thus the probability of a random eleven-letter word being ABRACADABRA is exactly $\left(\frac{1}{26}\right)^{11}$. So if typing 11 letters is one trial, the expected number of trials is $\displaystyle \frac1{\left(\frac{1}{26}\right)^{11}}=26^{11}$ which means $11\cdot 26^{11}$ keystrokes, right?
Well, not exactly. The problem is that we broke up our random string into eleven-letter blocks and waited until one block was ABRACADABRA. However, this word can start in the middle of a block. In other words, we considered a string a success only if the starting position of the word ABRACADABRA was divisible by 11. For example, FRZUNWRQXKLABRACADABRA would be recognized as success by this model but the same would not be true for AABRACADABRA. However, it is at least clear from this observation that $11\cdot 26^{11}$ is a strict upper bound for the expected waiting time.