文章
6
粉丝
94
获赞
1
访问
3.9k
#include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
vector<int> v;
typedef struct node{
int val;
struct node *left;
struct node *right;
}node;
void f1( node *root){
if(root!=NULL){
cout<<root->val<<" ";
if(root->left)f1(root->left);
if(root->right)f1(root->right);
}
}
void f2( node *root){
if(root!=NULL){
if(root->left)f2(root->left);
cout<<root->val<<" ";
if(root->right)f2(root->right);
}
}
void f3( node *root){
if(root){
&...
登录后发布评论
暂无评论,来抢沙发