(root, sum)
| 1 | def hasPathSum(root, sum): |
| 2 | if not root: |
| 3 | return False |
| 4 | if not root.left and not root.right: |
| 5 | return root.val == sum |
| 6 | return hasPathSum(root.left, sum - root.val) or hasPathSum(root.right, sum - root.val) |
nothing calls this directly
no outgoing calls
no test coverage detected