Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 2920. Maximum Points After Collecting Coins From All Nodes
Given a rooted tree with coin values, decide for each node whether to collect coins as coins[i]-k or as floor(coins[i]/2), where choosing the latter also halves every coin in its subtree (and multiple ancestor halvings stack), to maximize total points when all nodes must be collected. This requires a tree DP that tracks the propagated halving state along root-to-node paths (bounded by O(log(max coin))) to evaluate optimal choices.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.