mirror of
https://github.com/krahets/hello-algo.git
synced 2025-11-02 12:58:42 +08:00
fix preorder_traversal_iii_compact code
This commit is contained in:
@ -20,8 +20,6 @@ void preOrder(TreeNode *root) {
|
||||
if (root->val == 7) {
|
||||
// 记录解
|
||||
res.push_back(path);
|
||||
path.pop_back();
|
||||
return;
|
||||
}
|
||||
preOrder(root->left);
|
||||
preOrder(root->right);
|
||||
|
||||
Reference in New Issue
Block a user