Search
⌘K

Leetcode 2925. Maximum Score After Applying Operations on a Tree

Select a subset of nodes in a rooted tree to collect their positive values (setting them to zero) to maximize total collected value subject to the constraint that no root-to-leaf path becomes entirely collected (i.e., you must leave at least one node on every root-to-leaf path). This reduces to choosing a minimum-weight set of “kept” nodes that hits every root-to-leaf path and is typically solved with a tree DP.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.