Consider a random walk $X_j$ on $\mathbf{Z}$ that starts at $X_0 = k \in \{1, 2, \dots, N-1\}$. Let $T$ be the random time defined by $T = \min \{j | X_j \in \{0,N\}\}$ . Then if $prob(X_{j+1}>X_j) = p$ is constant, a closed form of the expected run time $\mathcal{E} T$ is well known (gambler's ruin).
What can one say about $T$ when $p_j = prob(X_{j+1} > X_j)$ is not constant? For starters, I'm interested in the case where $p_j = p$ for $j < K$ and $p_j = q$ for $j \ge K$, where $K$ is not too large and fixed.
Edit for clarification: Note that $p_j$ is not assumed to depend on the position $X_j$ of the particle, only on the time $j$ since the particle began its walk.