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