![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二叉树
sduthao
这个作者很懒,什么都没留下…
展开
-
已知一棵二叉树的中序遍历和后序遍历,求二叉树的先序遍历
#include #include #include struct node{ int data; struct node *lchild,*rchild;};struct node *creat(int n,char *a,char *b){ struct node *root; char *p; if(n == 0) ret原创 2017-02-22 21:03:21 · 1324 阅读 · 0 评论 -
二叉树:根据二叉树的先序遍历序列和中序遍历序列,输出该二叉树的后序遍历序列
#include #include #include struct node{ int data; struct node *lchild,*rchild;};struct node *creat(int n,char *a,char *b){ struct node *root; char *p; if(n==0) retur原创 2017-02-22 20:13:17 · 1970 阅读 · 0 评论 -
二叉树先序遍历,中序遍历,后序遍历
二叉树问题,根据先序序列输入字符,然后输出其先序遍历,中序遍历,后序遍历。#include #include #include typedef struct tree{ char data; struct tree *left, *right; //二叉树左孩子,右孩子}tree; //定义二叉树原创 2017-02-21 19:16:37 · 388 阅读 · 0 评论