mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-16 03:59:18 +08:00
Modify the problem of preorder_traversal_iii
This commit is contained in:
@@ -21,6 +21,7 @@ public class preorder_traversal_iii_compact {
|
||||
if (root.val == 7) {
|
||||
// 记录解
|
||||
res.Add(new List<TreeNode>(path));
|
||||
return;
|
||||
}
|
||||
preOrder(root.left);
|
||||
preOrder(root.right);
|
||||
|
||||
Reference in New Issue
Block a user