Least You Need to Know: Tree DP, Child-State Combination, and Rerooting Intuition
Les openen
Tree dynamic programming works because each node can summarize its subtree from its children. Rerooting extends that idea by reusing previously computed information when the root perspective shifts from one node to another.