* refactor: clean to roadmap content * refactor: move shared helpers into scripts/lib
763 B
763 B
Binary Tree Maximum Path Sum
Given a binary tree where nodes can have negative values, find the maximum sum of any path between any two nodes. At each node you decide whether to extend either child's path or start fresh, tracking the global maximum as you go. This is one of the hardest tree DFS problems and teaches you to separate what you return up the recursion from what you record as your answer.
Visit the following resources to learn more: