已知二叉樹的前序序列和中序序列,求二叉樹的後序序列

#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;
相關文章
相關標籤/搜索