Fix the code of preorder_traversal_iii_compact

This commit is contained in:
krahets
2023-07-21 22:08:26 +08:00
parent 075c3abf88
commit bba62bbe75
11 changed files with 19 additions and 10 deletions

View File

@ -20,6 +20,7 @@ void preOrder(TreeNode *root) {
if (root->val == 7) {
// 记录解
res.push_back(path);
path.pop_back();
return;
}
preOrder(root->left);