Amazon interview question

Dynamic programming - Recursion and Optimisation Algorithms