2014211590 李亞鳴
#include
#include
#include
#include
#include
#include
#include
using namespace std;
enum errorcode;
const int maxlen = 100;
//棧類
template
class stack
private:
t data[maxlen];
int count;
};template
errorcode stack::get_top(t &x)template
errorcode stack::push(t x)template
stack::stack()
template
bool stack::empty()
template
bool stack::full()
//佇列類
template
class queue;
template
queue::queue()
template
bool queue::empty()consttemplate
bool queue::full()consttemplate
errorcode queue::get_front(t &x)template
errorcode queue::append(t x)template
errorcode queue::serve()//類節點
template
class bnode
;int max_x(int x, int y)//二叉樹類
template
class btree
;template
btree::btree()
{ root = null;
資料結構練習二叉樹
學號 31301374 姓名張一博班級軟體工程1301 一 選擇題 1 按照二叉樹定義,具有3個結點的二叉樹共有 c 種形態。a 3 b 4 c 5d 6 2 具有五層結點的完全二叉樹至少有 d 個結點。a 9 b 15 c 31 d 16 3 以下有關二叉樹的說法正確的是 b a 二叉樹的度為2b...
資料結構試驗 二叉樹
實驗報告名稱 姓名學號專業班級 日期實驗6 二叉樹的建立及遍歷 一 實驗目的 1 學會實現二叉樹結點結構和對二叉樹的基本操作。2 掌握對二叉樹每種操作的具體實現,學會利用遞迴方法編寫對二叉樹這種遞迴資料結構進行處理的演算法。二 實驗要求 1 認真閱讀和掌握和本實驗相關的教材內容。2 編寫完整程式完成...
資料結構樹與二叉樹實驗報告
樹和二叉樹上機實習 1 實驗目的 1 熟悉二叉樹結點的結構。2 掌握對二叉樹基本操作的實現。3 理解遍歷的概念,會利用遞迴方法編寫對二叉樹結構進行遍歷的演算法。4 理解二叉樹的線索化過程是基於對二叉樹進行遍歷,而線索二叉樹上的線索又為相應的遍歷提供了方便。2 實驗要求 1 二叉樹的儲存及基本操作的實...