數據結構篇:二叉樹(一:二叉樹的基礎創建,遍歷及其他)

先給出結構 struct BiTree { char data; BiTree *lchild,*rchild; }; 二叉樹的創建 只能用先序法創建,單獨的中序或後序都無法進行創建,原因和解決辦法我會在下一篇博客進行完成 BiTree * Tree :: PreCreateBiTree() { BiTree *T; char c; cin>>c; if(c=='#') { T=N
相關文章
相關標籤/搜索