Skip to content

Commit 0c7a027

Browse files
authored
Update binary_tree_maximum_path_sum.py
1 parent 3e13946 commit 0c7a027

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

binary_tree_maximum_path_sum.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# coding: utf-8
22

33
class Solution:
44
"""
@@ -37,4 +37,6 @@ def _maxPathSum(self, root):
3737
- root.val + max_left_sum
3838
- root.val + max_right_sum
3939
'''
40-
return max(max(root.val + left_sum, root.val + right_sum), root.val)
40+
return max(max(root.val + left_sum, root.val + right_sum), root.val)
41+
42+
# medium: http://lintcode.com/zh-cn/problem/binary-tree-maximum-path-sum/

0 commit comments

Comments
 (0)