Pixxel interview question

Coding questions Dynamic programming problem