mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-13 16:49:44 +08:00
fix preorder_traversal_iii_compact code
This commit is contained in:
@@ -23,8 +23,6 @@ function preOrder(
|
||||
if (root.val === 7) {
|
||||
// 记录解
|
||||
res.push([...path]);
|
||||
path.pop();
|
||||
return;
|
||||
}
|
||||
preOrder(root.left, path, res);
|
||||
preOrder(root.right, path, res);
|
||||
|
||||
Reference in New Issue
Block a user