Citadel Interview Question

Gambler ruin problem, Dynamic programming (live coding)