Amazon interview question

Questions based on Dynamic programming