文件名称:SortTree
- 所属分类:
- 其它资源
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 14.89kb
- 下载次数:
- 0次
- 提 供 者:
- 段**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
创建一棵二叉排序树,并采用中序遍历和层次遍历法输出其顶点序列,主要实验内容如下:
1. 定义二叉排序树的结构BiTree;
2. 编制二叉排序树的插入算法:void Insert_SortTree (BiTree ST, ElemType x);
3. 编制中序遍历函数;
4. 在main()函数中完成二叉排序树的建立,以及中序遍历的输出。(二叉排序树的各个元素从键盘输入,并利用Insert_SortTree()函数进行插入建立);
5. 编制层次遍历函数,并在main()函数中完成层次遍历的输出。层次遍历法要利用“队列”来实现;为此需要定义一个队列结构(可以采用链队列,也可以采用循环顺序队列),并实现相关的队列函数。
-create a binary sort tree, and used the preorder and output levels traversal sequence its peak, the main contents are as follows : 1. Sort definition of two fork BiTree tree structure; 2. Ranking compiled binary tree insertion algorithm : void Insert_SortTree (BiTree ST ElemType x); 3. establishment preorder function; 4. in the main () function to complete binary tree in order to establish, and the Central preorder output. (2 forks ranking tree various elements from the keyboard input, and the use of Insert_SortTree () function to insert the establishment); 5. Traversing the preparation level functions, and the main () function to complete traverse the output level. Level traversal to using "queue" to achieve; This requires definition of a cohort structure (Queue chain can be use
1. 定义二叉排序树的结构BiTree;
2. 编制二叉排序树的插入算法:void Insert_SortTree (BiTree ST, ElemType x);
3. 编制中序遍历函数;
4. 在main()函数中完成二叉排序树的建立,以及中序遍历的输出。(二叉排序树的各个元素从键盘输入,并利用Insert_SortTree()函数进行插入建立);
5. 编制层次遍历函数,并在main()函数中完成层次遍历的输出。层次遍历法要利用“队列”来实现;为此需要定义一个队列结构(可以采用链队列,也可以采用循环顺序队列),并实现相关的队列函数。
-create a binary sort tree, and used the preorder and output levels traversal sequence its peak, the main contents are as follows : 1. Sort definition of two fork BiTree tree structure; 2. Ranking compiled binary tree insertion algorithm : void Insert_SortTree (BiTree ST ElemType x); 3. establishment preorder function; 4. in the main () function to complete binary tree in order to establish, and the Central preorder output. (2 forks ranking tree various elements from the keyboard input, and the use of Insert_SortTree () function to insert the establishment); 5. Traversing the preparation level functions, and the main () function to complete traverse the output level. Level traversal to using "queue" to achieve; This requires definition of a cohort structure (Queue chain can be use
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 19854832sorttree.rar 列表 SortTree\Queue.h SortTree\SortTree.cpp SortTree\StdAfx.h SortTree\StdAfx.cpp SortTree\ReadMe.txt SortTree\SortTree.dsw SortTree\SortTree.ncb SortTree\SortTree.plg SortTree\GlobalDefining.h SortTree\BiTree.h SortTree\SortTree.dsp SortTree\BiTree.cpp SortTree\SortTree.opt SortTree