上传者: 59708493 
                                    |
                                    上传时间: 2022-12-16 09:15:04
                                    |
                                    文件大小: 11KB
                                    |
                                    文件类型: DOCX
                                
                            
                                
                            
                                满二叉树的前序遍历
 	if(T==NULL)
 		return ;
 	MidCreat(T->lchild);
 	cout<data<<" ";
 	MidCreat(T->rchild);
 }
 //后序遍历算法
 void RearCreat(tree T)  
 {
 	if(T==NULL)
 		return ;
 	RearCreat(T->lchild);
 	RearCreat(T->rchild);
 	cout<data<<" ";
 }
int main()
{
	printf("请输入第一个节点的数据:\n");
	tree T;
	CreatTree(&T);
	cout<<"前序遍历:"; 
	PreCreat(T); 
	cout<<"\n中序遍历:";
	MidCreat(T) ;
	cout<<"\n后序遍历:";
	RearCreat(T) ;
 }