Tree DP

Back to On Trees

Dynamic programming on tree structures where the state of each node depends on its children’s states. Solved by post-order traversal (processing children before parents). Common problems include maximum independent set, tree diameter, and subtree queries.

algorithms dynamic-programming tree-dp