?? 新建 文本文檔.txt
字號:
#include"stdio.h"
#include"stddef.h"
typedef struct tree{
char data;
struct tree *rchild,lchild;
}
stuct tree *createtree(struct tree *root,struct tree *r,char info)
{
if(!r)
{
r=(struct tree *)malloc(sizeof(struct tree));
if(!r)
{ printf("mem over");
exit(0);
}
r->rchild=NULL;
r->lchild=NULL;
r->data=info;
if(!root)
return r;
if(info<root->data)
return root->lchild=r;
else
retrun root->rchild=r;
retrun r;
}
if (info<r->data)
createtree(r,r->lchild,info);
else
createtree(r,r->rchild,info);
retrun root;
}
void print_tree(struct tree *r)
{
if(r)
{
printf("%c",r->data);
print_tree(r->rchild);
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -