Skip to content
  • Sponsor azl397985856/leetcode

  • Notifications You must be signed in to change notification settings
  • Fork 9.5k
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f6fcaf6

Browse files
author
lucifer
committedNov 26, 2020
fix: typo
1 parent 7acd5fe commit f6fcaf6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎thinkings/tree.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -581,15 +581,15 @@ class Solution:
581581
res.append((path + [cur.val]).copy())
582582
return
583583
# 选择
584-
tepathmp.append(cur.val)
584+
path.append(cur.val)
585585
# 递归左右子树
586586
backtrack(nodes, path, cur.left, remain - cur.val)
587587
backtrack(nodes, path, cur.right, remain - cur.val)
588588
# 撤销选择
589589
path.pop(-1)
590590
ans = []
591591
# 入口,路径,目标值全部传进去,其中路径和path都是扩展的参数
592-
dfs(ans, [], root, target, )
592+
backtrack(ans, [], root, target)
593593
return ans
594594

595595

0 commit comments

Comments
 (0)
Please sign in to comment.