Solution (source code)

= Solution

Let $m_k$ be the expected remaining <hitting time> of either endpoint, measured in minutes. The first step consumes one minute, after which <first-step analysis> gives
$$
\boxed{m_k=1+\frac12m_{k-1}+\frac12m_{k+1},\quad1\le k\le19;\qquad m_0=m_{20}=0.}
$$
The <expectation> is finite: from any interior state, a block of twenty leftward steps guarantees absorption and has probability $2^{-20}$. Thus the survival probability over successive twenty-step blocks has a geometric upper bound. This justifies using finite <expectations> in the recurrence.