文件名称:exercise
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 755kb
- 下载次数:
- 0次
- 提 供 者:
- L***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
(实习题) 从键盘上输 入一串正整数, 最后输入-1作为输入结束的标志。如输入的序列为:2,5,7,23,48,96,……,-1。请以这些正整数的值作为二叉排序树中的结点的数据场之值,建立一棵二叉排序树。注意:请采用动态存储方法保存这棵二叉排序树,事先并未知道该二叉排序树中的结点的个数。
2、 (作业题) 已知一棵排序二叉树,树中结点的形式为:
data info left right
其中,data 给出结点的数据场,info 给出本结点的左子树中的结点总数,left和 right 分别给出本结点的左儿子和右儿子的地址。数据场data 和info的类型皆为 int。又已知该二叉排序树的根结点的地址为 root。请设计二个函数,分别实现下述功能:
1. 按递增序找出该二叉排序树中的第 i 个小的结点。
2. 插入数据场之值为 x 的结点,并仍应保持该二叉排序树的性质不
变。
3、 (作业题) 已知一棵二叉排序树,其根结点的地址为 root。请编写一个程序,构造出一棵具有相同结点的完全二叉树,且它同样是二叉排序树。
6/39
4、(选作题)在平衡的排序二叉树的中,试编写删除具有给定关键字的结点的函数。
-(Attachment title) from the keyboard to enter a positive integer, the last input-1 as the input end of the sign. If the input sequence: 2,5,7,23,48,96, ... ...,-1. Please these are integer values as binary sort tree nodes of the value data field, the establishment of a binary sort tree. NOTE: Please save the tree with dynamic storage is binary sort tree, did not know in advance of the binary sort tree, the number of nodes.
2, (working title) is known a sort tree, the tree nodes in the form of:
data info left right
One, data node given the data field, info is given the left sub-tree nodes in the total number of nodes, left and right nodes are given the left and right son of the son s address. Data field data and the type of info are all int. It is known that the binary sort tree root node s address root. Please design two functions, namely to achieve the following functions:
1. By increasing order to find the binary sort tree nodes i-small.
2. Insert data field of the
2、 (作业题) 已知一棵排序二叉树,树中结点的形式为:
data info left right
其中,data 给出结点的数据场,info 给出本结点的左子树中的结点总数,left和 right 分别给出本结点的左儿子和右儿子的地址。数据场data 和info的类型皆为 int。又已知该二叉排序树的根结点的地址为 root。请设计二个函数,分别实现下述功能:
1. 按递增序找出该二叉排序树中的第 i 个小的结点。
2. 插入数据场之值为 x 的结点,并仍应保持该二叉排序树的性质不
变。
3、 (作业题) 已知一棵二叉排序树,其根结点的地址为 root。请编写一个程序,构造出一棵具有相同结点的完全二叉树,且它同样是二叉排序树。
6/39
4、(选作题)在平衡的排序二叉树的中,试编写删除具有给定关键字的结点的函数。
-(Attachment title) from the keyboard to enter a positive integer, the last input-1 as the input end of the sign. If the input sequence: 2,5,7,23,48,96, ... ...,-1. Please these are integer values as binary sort tree nodes of the value data field, the establishment of a binary sort tree. NOTE: Please save the tree with dynamic storage is binary sort tree, did not know in advance of the binary sort tree, the number of nodes.
2, (working title) is known a sort tree, the tree nodes in the form of:
data info left right
One, data node given the data field, info is given the left sub-tree nodes in the total number of nodes, left and right nodes are given the left and right son of the son s address. Data field data and the type of info are all int. It is known that the binary sort tree root node s address root. Please design two functions, namely to achieve the following functions:
1. By increasing order to find the binary sort tree nodes i-small.
2. Insert data field of the
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5080309812_黄博_第三次作业\BinarySearchTree\BinarySearchTree.vcproj
..........................\................\BinarySearchTree.vcproj.beyondbill-PC.beyondbill.user
..........................\................\BST.h
..........................\................\BSTNode.h
..........................\................\Debug\BinarySearchTree.exe.embed.manifest
..........................\................\.....\BinarySearchTree.exe.embed.manifest.res
..........................\................\.....\BinarySearchTree.exe.intermediate.manifest
..........................\................\.....\BuildLog.htm
..........................\................\.....\main.obj
..........................\................\.....\mt.dep
..........................\................\.....\vc90.idb
..........................\................\.....\vc90.pdb
..........................\................\main.cpp
..........................\................\Release\BinarySearchTree.exe.intermediate.manifest
..........................\................\.......\BuildLog.htm
..........................\................\.......\main.obj
..........................\................\.......\mt.dep
..........................\................\.......\vc90.idb
..........................\................\.......\vc90.pdb
..........................\BinarySearchTree.ncb
..........................\BinarySearchTree.sln
..........................\BinarySearchTree.suo
..........................\Debug\BinarySearchTree.exe
..........................\.....\BinarySearchTree.ilk
..........................\.....\BinarySearchTree.pdb
..........................\Release\BinarySearchTree.exe
..........................\.......\BinarySearchTree.pdb
..........................\BinarySearchTree\Debug
..........................\................\Release
..........................\BinarySearchTree
..........................\Debug
..........................\Release
5080309812_黄博_第三次作业
..........................\................\BinarySearchTree.vcproj.beyondbill-PC.beyondbill.user
..........................\................\BST.h
..........................\................\BSTNode.h
..........................\................\Debug\BinarySearchTree.exe.embed.manifest
..........................\................\.....\BinarySearchTree.exe.embed.manifest.res
..........................\................\.....\BinarySearchTree.exe.intermediate.manifest
..........................\................\.....\BuildLog.htm
..........................\................\.....\main.obj
..........................\................\.....\mt.dep
..........................\................\.....\vc90.idb
..........................\................\.....\vc90.pdb
..........................\................\main.cpp
..........................\................\Release\BinarySearchTree.exe.intermediate.manifest
..........................\................\.......\BuildLog.htm
..........................\................\.......\main.obj
..........................\................\.......\mt.dep
..........................\................\.......\vc90.idb
..........................\................\.......\vc90.pdb
..........................\BinarySearchTree.ncb
..........................\BinarySearchTree.sln
..........................\BinarySearchTree.suo
..........................\Debug\BinarySearchTree.exe
..........................\.....\BinarySearchTree.ilk
..........................\.....\BinarySearchTree.pdb
..........................\Release\BinarySearchTree.exe
..........................\.......\BinarySearchTree.pdb
..........................\BinarySearchTree\Debug
..........................\................\Release
..........................\BinarySearchTree
..........................\Debug
..........................\Release
5080309812_黄博_第三次作业