Amazon interview question

Dynamic programming , network flow, graph