已知二叉树的前序序列和中序序列,求二叉树的后序序列

#include <stdio.h> #include <stdlib.h> int pre_p=1,pre[1001],in[1001],n,count_print;//pre_p用于遍历前序序列 //pre为前序序列数组,in为后序序列数组,n为二叉树中的元素个数,即序列长度,count_print用于规范输出格式 typedef struct Node { int data;
相关文章
相关标签/搜索