Domanda di colloquio di Anonymous

dynamic programming problem with a twist