Amazon interview question

They asked me to write the code for a dynamic programming problem.