Maximum Subtree Sum with Tree Dynamic Programming
We are given a tree of (n) nodes, each carrying an integer weight (which may be negative). The task is to select a connected subgraph that forms a subtree and maximise the sum of the node weights inside it. The problem appears with two common variants: one that allows an empty selection (answer at least 0) and one that requires at least one nod ...
Posted on Mon, 13 Jul 2026 16:31:14 +0000 by rodin