124. Binary Tree Maximum Path Sum
https://leetcode.com/problems/binary-tree-maximum-path-sum/description/
Input: [1,2,3]
1
/ \
2 3
Output: 6Input: [-10,9,20,null,null,15,7]
-10
/ \
9 20
/ \
15 7
Output: 42Thoughts
Code
Analysis
Ver.2
Previous549. Binary Tree Longest Consecutive Sequence IINext865. Smallest Subtree with all the Deepest Nodes
Last updated