CodingReported in a candidate post, Aug 2024
Maximize score from tree nodes without picking adjacent nodes
Filed under PhonePe
The question
Given a tree where each node has a value, select nodes to maximize the total score such that no two selected nodes are direct children of each other.
No write-up yet. Related questions below have one.
Related PhonePe questions
Collected from public candidate posts and coding forums. Updated Nov 2026.