mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-05 11:41:22 +08:00
fix preorder_traversal_iii_compact code
This commit is contained in:
@@ -21,8 +21,6 @@ public class preorder_traversal_iii_compact {
|
||||
if (root.val == 7) {
|
||||
// 记录解
|
||||
res.Add(new List<TreeNode>(path));
|
||||
path.RemoveAt(path.Count - 1);
|
||||
return;
|
||||
}
|
||||
preOrder(root.left);
|
||||
preOrder(root.right);
|
||||
|
||||
Reference in New Issue
Block a user