1:分清楚递归里面return的和真正之后需要的max可以是不同的variable,只需要到时候分开处理就可以:
https://leetcode.com/problems/binary-tree-maximum-path-sum/submissions/2131246376/
1:分清楚递归里面return的和真正之后需要的max可以是不同的variable,只需要到时候分开处理就可以:
https://leetcode.com/problems/binary-tree-maximum-path-sum/submissions/2131246376/
Comment to Unlock
Sign in with GitHub, leave a comment below, then verify it to unlock this post.
Sign in with GitHub