Google interview question

DSA : Dynamic Programming + Graphs