mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-12 15:36:05 +00:00
fix preorder_traversal_iii_compact code
This commit is contained in:
@@ -22,8 +22,6 @@ void preOrder(
|
||||
if (root.val == 7) {
|
||||
// 记录解
|
||||
res.add(List.from(path));
|
||||
path.removeLast();
|
||||
return;
|
||||
}
|
||||
preOrder(root.left, path, res);
|
||||
preOrder(root.right, path, res);
|
||||
|
||||
Reference in New Issue
Block a user