文章
82
粉丝
344
获赞
28
访问
703.0k
#include<iostream>
#include<queue>
#include<string>
#include<string.h>
using namespace std;
typedef struct node{
char data;
struct node*lchild;
struct node*rchild;
}BiNode,*BiTree;
queue<BiTree> q;
BiTree build(){
char c;
cin>>c;
BiTree root=new node;
root->data=c;
q.push(root);
while(!q.empty()){
BiTree t=q.front();
q.pop();
cin>>c;
if(c=='#'){
t->lchild=NULL;
}
else{
BiTree xx=new node;
&n...
登录后发布评论
暂无评论,来抢沙发