Pregunta de entrevista de Citadel Securities

dynamic programming game, find the recursion.