Optiver Interview Question

DP coding on random walk