Citadel Securities Interview Question

dynamic programming game, find the recursion.