Given a tree where each node has a value and a list of its child nodes, find the maximum sum of node values from the root node to a leaf node. The tree is represented as a nested list, where each node is a list containing the node's value and a list of its child nodes.
Explanation: The path with the maximum sum is 1 -> 2 -> 3, resulting in a sum of 6.
Analyze constraints and compute optimal solutions step-by-step.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak