mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 04:31:55 +08:00
fix preorder_traversal_iii_compact code
This commit is contained in:
@ -18,8 +18,6 @@ function preOrder(root, path, res) {
|
||||
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