Skip to content

Commit f8fd874

Browse files
authored
Update 112_Path_Sum.py
1 parent 4d86dca commit f8fd874

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/112_Path_Sum.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ def hasPathSum(self, root, sum):
2121
left = self.hasPathSum(root.left, sum)
2222
# check right
2323
right = self.hasPathSum(root.right, sum)
24-
return (left or right)
24+
return (left or right) # one of them is True, return true

0 commit comments

Comments
 (0)