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