已知二叉樹的先序遍歷和中序遍歷序列,輸出後序遍歷序列

#include <stdio.h> #include<string.h> const int N=20; char s1[N], s2[N], ans[N];//s1[N],s2[N]分別爲先序和中序遍歷序列 void build(int n, char* s1, char* s2, char* s) { if(n <= 0) return; int p = strchr(s2, s1[0]
相關文章
相關標籤/搜索