Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/austingebauer/go-leetcode
/ maxPathSum
Function
maxPathSum
binary_tree_maximum_path_sum_124/solution.go:10–14 ·
view source on GitHub ↗
(root *TreeNode)
Source
from the content-addressed store, hash-verified
8
var
max int
9
10
func
maxPathSum(root *TreeNode) int {
11
max = math.MinInt32
12
maxPathSumHelper(root)
13
return
max
14
}
15
16
func
maxPathSumHelper(root *TreeNode) int {
17
if
root == nil {
Callers
1
Test_maxPathSum
Function · 0.85
Calls
1
maxPathSumHelper
Function · 0.85
Tested by
1
Test_maxPathSum
Function · 0.68