文章
71
粉丝
142
获赞
5
访问
51.3k
#include<iostream>
#include<string>
using namespace std;
int m = -1;
typedef struct Tnode {
int data;
struct Tnode* lchild, * rchild;
}Tnode, * Tree;
void Insert(Tree &T,int x,Tree &p) {
if (T == NULL) {
if (p == NULL) {
cout <<m << endl;
}
else
cout << p->data << endl;
T = new Tnode;
T->data = x;
T->lchild = NULL;
T->rchild = NULL;
return;
}
if (T->data == x) return;
else if (x ...
登录后发布评论
暂无评论,来抢沙发