mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
Modify the problem of preorder_traversal_iii
This commit is contained in:
@ -18,6 +18,7 @@ function preOrder(root, path, res) {
|
||||
if (root.val === 7) {
|
||||
// 记录解
|
||||
res.push([...path]);
|
||||
return;
|
||||
}
|
||||
preOrder(root.left, path, res);
|
||||
preOrder(root.right, path, res);
|
||||
|
||||
Reference in New Issue
Block a user