From 08169cefbc060617dd9a0b81de069c1b88a7719c Mon Sep 17 00:00:00 2001 From: zhywanna <47680024+zhywanna@users.noreply.github.com> Date: 2022年9月11日 16:12:58 +0800 Subject: [PATCH] =?UTF-8?q?Update=200112.=E8=B7=AF=E5=BE=84=E6=80=BB?= =?UTF-8?q?=E5=92=8C.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1\ return 的位置错误 2\ 第二个traversal的输入值错误 --- .../0112.350円267円257円345円276円204円346円200円273円345円222円214円.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/problems/0112.350円267円257円345円276円204円346円200円273円345円222円214円.md" "b/problems/0112.350円267円257円345円276円204円346円200円273円345円222円214円.md" index d4cb51908d..c6c22e7d2c 100644 --- "a/problems/0112.350円267円257円345円276円204円346円200円273円345円222円214円.md" +++ "b/problems/0112.350円267円257円345円276円204円346円200円273円345円222円214円.md" @@ -499,7 +499,7 @@ class solution: if not cur_node.left and not cur_node.right: if remain == 0: result.append(path[:]) - return + return if cur_node.left: path.append(cur_node.left.val) @@ -508,7 +508,7 @@ class solution: if cur_node.right: path.append(cur_node.right.val) - traversal(cur_node.right, remain-cur_node.left.val) + traversal(cur_node.right, remain-cur_node.right.val) path.pop() result, path = [], []