Microsoft interview question

Graphs, Trees and Dynamic Programming,