111. Binary Tree Maximum Path Sum
HardTree
A path in a binary tree is a sequence of nodes. Return the maximum path sum of any non-empty path. Tree is given as level-order array with null for missing nodes.
Examples
Input: [-10,9,20,null,null,15,7]
Output: 42
Explanation: Public test case for Binary Tree Maximum Path Sum
Constraints
- Number of nodes is in range [1, 3*10^4]
- -1000 <= Node.val <= 1000
Loading...
Run checks all cases above. Submit evaluates all test cases.