Amazon interview question

They asked me a medium difficulty dynamic programming question.