Amazon interview question

Coding Question : Graphs and Dynamic programming