Citadel Securities interview question

dynamic programming game, find the recursion.