文章
37
粉丝
98
获赞
4
访问
22.5k
#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
struct node {
char data;
struct node* left, * right;
};
struct node* insertTree(struct node* T,char x) {
if (T == NULL) {//创建结点
T = (struct node*)malloc(sizeof(struct node));
T->data = x;
T->left = NULL;
T->right = NULL;
}
else {
if (x < T->data) {
//往左子树走
T->left = insertTree(T->left, x);
}
else if (x > T->data) {
 ...
登录后发布评论
暂无评论,来抢沙发