已知前序、中序,遞歸創建二叉樹(C語言)

#include <stdio.h> #include <malloc.h> int pre[]={1,2,4,5,3,6,7};//前序序列 int ino[]={4,2,5,1,6,3,7};//中序序列 struct BTree { struct BTree *left,*right; int data; };//樹節點定義 void BuildBTree(struct BT
相關文章
相關標籤/搜索