Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - sort st
Search - sort st - List
创建一棵二叉排序树,并采用中序遍历和层次遍历法输出其顶点序列,主要实验内容如下: 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
Date : 2025-12-27 Size : 15kb User : 段苛苛
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.