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 d9ae152 commit e82eab9Copy full SHA for e82eab9
data_structures/binary_tree/binary_tree_path_sum.py
@@ -56,21 +56,20 @@ class BinaryTreePathSum:
56
0
57
58
The second tree looks like this
59
- 0
60
- / \
61
- 5 5
+ 0
+ / \
+ 5 5
62
63
>>> tree2 = Node(0)
64
>>> tree2.left = Node(5)
65
>>> tree2.right = Node(15)
66
67
>>> BinaryTreePathSum().path_sum(tree2, 5)
68
- 2
+ 1
69
>>> BinaryTreePathSum().path_sum(tree2, -1)
70
71
>>> BinaryTreePathSum().path_sum(tree2, 0)
72
1
73
-
74
"""
75
76
target: int
0 commit comments