Domanda di colloquio di Showatech

They asked to solve the problem in dynamic programming