What this random walk interview question tests
This is a medium-difficulty probability question that asks you to calculate the expected duration of a finite random walk with absorbing barriers. It appears frequently in quant interviews because it combines several core skills: setting up recurrence relations, reasoning about symmetry and boundary conditions, and solving a system of linear equations under pressure.
The problem rewards candidates who can model the situation cleanly—defining expected values at each state and using the structure of the coin flip to write equations that relate them. Rather than simulate or brute-force, the fastest approach involves recognizing that you can express the expected number of steps from any position in terms of its neighbours, then solve the resulting system.
- Recurrence relations for random processes
- Absorbing and reflecting barriers
- Systems of linear equations from symmetry
- Expected value by conditioning on the first step