Optiver interview question

DP coding on random walk