二叉树的实现

时间:2017-12-04 17:31:33
【文件属性】:

文件名称:二叉树的实现

文件大小:178KB

文件格式:RAR

更新时间:2017-12-04 17:31:33

二叉树

二叉树的实现代码 /*LinkTree.h*/ typedef int DataType; //这样定义意味着节点中能放一个整数,但如果是非叶子节点则可以解读为对应的操作符的ascii struct Node; typedef Node* BinTree; //type of binary tree struct Node /* type of node*/ { DataType info; BinTree llink; BinTree rlink; }; BinTree createEmptyTree( void ); BinTree consBintree (DataType val, BinTree left, BinTree right); //construct a tree int isNull (BinTree tr); //find out if it is an empty tree BinTree leftChild(BinTree tr); //return the left child of the tree BinTree rightChild(BinTree tr); //return the right child of the tree DataType visitRoot(BinTree tr); //visit the root of the tree void preOrder( BinTree t); //travel pre order void postOrder( BinTree t); //travel post order void inOrder( BinTree t); //travel in order


【文件预览】:
00811031第一题最新
----binTree.cpp(1KB)
----treeBasic.vcproj.ICL-KC6C7FJ9RRU.hujunfeng.user(1KB)
----treeBasic.sln(883B)
----treeBasic.ncb(57KB)
----treeBasic.opt(49KB)
----treeBasic.vcproj(6KB)
----treeBasic.dsw(733B)
----treeBasic.plg(954B)
----treeBasic.dsp(4KB)
----main.cpp(2KB)
----treeBasic.suo(13KB)
----TreeTravel.cpp(545B)
----Debug()
--------treeBasic.ilk(188KB)
--------vc60.idb(41KB)
--------main.obj(6KB)
--------treeBasic.pdb(425KB)
--------treeBasic.exe(172KB)
--------vc60.pdb(52KB)
--------treeBasic.pch(200KB)
--------TreeTravel.obj(4KB)
--------binTree.obj(5KB)
----LinkTree.h(884B)

网友评论