Skip to content

What the tree structure buys

The same problem is posed on a tree and on a general graph.

What does the tree guarantee that makes the DP straightforward?