SortTree

所属分类:数据结构
开发工具:Visual C++
文件大小:15KB
下载次数:13
上传日期:2007-05-20 12:57:09
上 传 者mwyskd
说明:  创建一棵二叉排序树,并采用中序遍历和层次遍历法输出其顶点序列,主要实验内容如下: 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)

文件列表:
SortTree\Queue.h (375, 2006-12-06)
SortTree\SortTree.cpp (1330, 2006-12-06)
SortTree\StdAfx.h (667, 2006-11-29)
SortTree\StdAfx.cpp (295, 2006-11-29)
SortTree\SortTree.dsw (539, 2006-11-29)
SortTree\SortTree.ncb (74752, 2007-01-13)
SortTree\SortTree.plg (250, 2006-12-12)
SortTree\GlobalDefining.h (211, 2006-12-06)
SortTree\BiTree.h (295, 2006-12-06)
SortTree\SortTree.dsp (4807, 2006-12-06)
SortTree\BiTree.cpp (2171, 2006-12-09)
SortTree\SortTree.opt (54784, 2007-01-13)
SortTree (0, 2006-11-29)

======================================================================== CONSOLE APPLICATION : SortTree ======================================================================== AppWizard has created this SortTree application for you. This file contains a summary of what you will find in each of the files that make up your SortTree application. SortTree.dsp This file (the project file) contains information at the project level and is used to build a single project or subproject. Other users can share the project (.dsp) file, but they should export the makefiles locally. SortTree.cpp This is the main application source file. ///////////////////////////////////////////////////////////////////////////// Other standard files: StdAfx.h, StdAfx.cpp These files are used to build a precompiled header (PCH) file named SortTree.pch and a precompiled types file named StdAfx.obj. ///////////////////////////////////////////////////////////////////////////// Other notes: AppWizard uses "TODO:" to indicate parts of the source code you should add to or customize. /////////////////////////////////////////////////////////////////////////////

近期下载者

相关文件


收藏者