Amazon interview question

Dynamic programming and basics of programming.