Domanda di colloquio di Intuit

it was a dynamic programming question