(root: TreeNode)
| 13 | max_sum = float('-inf') |
| 14 | |
| 15 | def max_path_sum(root: TreeNode) -> int: |
| 16 | global max_sum |
| 17 | max_path_sum_helper(root) |
| 18 | return max_sum |
| 19 | |
| 20 | def max_path_sum_helper(node: TreeNode) -> int: |
| 21 | global max_sum |
nothing calls this directly
no test coverage detected