We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3780328 commit d18499dCopy full SHA for d18499d
Algorithms/0124.binary-tree-maximum-path-sum/binary-tree-maximum-path-sum.go
@@ -13,8 +13,8 @@ func maxPathSum(root *TreeNode) int {
13
14
maxSum := root.Val
15
16
- // 返回,从 root 出发,包含 root 在内的所有可能路径的最大的 sum 值
17
var dfs func(*TreeNode) int
+ // 返回,以 root 为起点,所有可能路径的 sum 值中的最大值。
18
dfs = func(root *TreeNode) int {
19
if root == nil {
20
return 0
0 commit comments