leetle

Daily challenge for 2025-06-19

170. Binary Tree Maximum Path Sum

Write a function solve that finds the maximum sum of any path in a binary tree. A path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connections.

Example:
Input: [1, 2, 3] (representing tree 1-2-3)
Output: 6 (path: 2 -> 1 -> 3)

Run this challenge interactively in Python or JavaScript when the app loads.