← Optiver Interview Insights

Optiver·Data Scientist·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Optiver Data Scientist interview with a classic probability/random walk puzzle. The kind of question where you either see the structure quickly or spend ten minutes drawing octagons on a whiteboard.

Questions Asked (1)

Q1

Two particles start at opposite vertices of a regular octagon, four steps apart. Each time step, each particle independently flips a fair coin and moves one step clockwise or counterclockwise. What is the expected number of total coin flips until both particles land on the same vertex?

Algorithms & Data StructuresTechnical Trade-offs
Author's notes

The key insight I kept fumbling around before landing on: you can reduce this to tracking the relative gap between the two particles, which itself does a random walk on a cycle.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Model the problem as a Markov chain on the distance between the particles modulo 8, then solve for the expected hitting time using first-step analysis. Alternatively, use the fact that the difference process is a simple random walk on a cycle and compute the expected time to hit 0 from distance 4.

Pro tip: After deriving the answer, sanity-check it by considering the symmetry and the expected time for a single particle to return to its start (8 steps). The answer should be less than 8 because the particles are moving toward each other half the time.

1. Define the state

Let the state be the clockwise distance from particle A to particle B modulo 8. Initially, the distance is 4 (since they are opposite).

2. Determine state transitions

Each step, the distance changes by +1, -1, or 0 with probabilities 1/4, 1/4, and 1/2 respectively, because each particle moves independently.

3. Set up equations for expected hitting time

Let E_i be the expected number of steps to reach state 0 from state i. Write equations using first-step analysis: E_i = 1 + (1/4)E_{i+1} + (1/4)E_{i-1} + (1/2)E_i, with E_0 = 0.

4. Solve the system

Simplify the equations to 2E_i - E_{i+1} - E_{i-1} = 4, and solve the linear system for E_4, using symmetry E_i = E_{8-i}.

5. Compute and verify

Solve to get E_4 = 8. Verify by checking that the expected time is reasonable and consistent with the random walk properties.

Key Points to Mention

  • Markov chain modeling and state space reduction
  • First-step analysis for expected hitting times
  • Symmetry of the random walk on a cycle
  • Difference process as a simple random walk with holding
  • Solving linear recurrence relations
  • Sanity checking the result against known random walk results

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.