Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
leeguandong committed Sep 26, 2018
2 parents 2c9f99a + a564131 commit f05aef5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions 剑指offer/二叉树中和为某一值的路径.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def FindPath2(root, path, currentNum):
FindPath2(root.left, path, currentNum)
if root.right:
FindPath2(root.right, path, currentNum)
# 拿到一个正确的路径后要弹出,回到上一次父节点继续递归
path.pop()

FindPath2(root, [], 0)
Expand Down

0 comments on commit f05aef5

Please sign in to comment.