标签:roo bsp key void null pre back style div
1 vector<int> res; 2 int key1, key2; 3 4 void traverse(TreeNode * root){//采用前序遍历 5 if(root == NULL) 6 return; 7 if(key1 <= root->val && key2 >= root->val)//满足条件的就存入 8 res.push_back(root->val); 9 traverse(root->left); 10 traverse(root->right);
标签:roo bsp key void null pre back style div
原文地址:https://www.cnblogs.com/wfq9330/p/9560660.html