文件名称:exercise
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:754.57kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
(实习题) 从键盘上输 入一串正整数, 最后输入-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
相关搜索: exercise 5
(系统自动生成,下载前可以参看下载内容)
下载文件列表
5080309812_黄博_第三次作业/BinarySearchTree/BinarySearchTree.vcproj
5080309812_黄博_第三次作业/BinarySearchTree/BinarySearchTree.vcproj.beyondbill-PC.beyondbill.user
5080309812_黄博_第三次作业/BinarySearchTree/BST.h
5080309812_黄博_第三次作业/BinarySearchTree/BSTNode.h
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.embed.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.embed.manifest.res
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.intermediate.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BuildLog.htm
5080309812_黄博_第三次作业/BinarySearchTree/Debug/main.obj
5080309812_黄博_第三次作业/BinarySearchTree/Debug/mt.dep
5080309812_黄博_第三次作业/BinarySearchTree/Debug/vc90.idb
5080309812_黄博_第三次作业/BinarySearchTree/Debug/vc90.pdb
5080309812_黄博_第三次作业/BinarySearchTree/main.cpp
5080309812_黄博_第三次作业/BinarySearchTree/Release/BinarySearchTree.exe.intermediate.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Release/BuildLog.htm
5080309812_黄博_第三次作业/BinarySearchTree/Release/main.obj
5080309812_黄博_第三次作业/BinarySearchTree/Release/mt.dep
5080309812_黄博_第三次作业/BinarySearchTree/Release/vc90.idb
5080309812_黄博_第三次作业/BinarySearchTree/Release/vc90.pdb
5080309812_黄博_第三次作业/BinarySearchTree.ncb
5080309812_黄博_第三次作业/BinarySearchTree.sln
5080309812_黄博_第三次作业/BinarySearchTree.suo
5080309812_黄博_第三次作业/Debug/BinarySearchTree.exe
5080309812_黄博_第三次作业/Debug/BinarySearchTree.ilk
5080309812_黄博_第三次作业/Debug/BinarySearchTree.pdb
5080309812_黄博_第三次作业/Release/BinarySearchTree.exe
5080309812_黄博_第三次作业/Release/BinarySearchTree.pdb
5080309812_黄博_第三次作业/BinarySearchTree/Debug
5080309812_黄博_第三次作业/BinarySearchTree/Release
5080309812_黄博_第三次作业/BinarySearchTree
5080309812_黄博_第三次作业/Debug
5080309812_黄博_第三次作业/Release
5080309812_黄博_第三次作业
5080309812_黄博_第三次作业/BinarySearchTree/BinarySearchTree.vcproj.beyondbill-PC.beyondbill.user
5080309812_黄博_第三次作业/BinarySearchTree/BST.h
5080309812_黄博_第三次作业/BinarySearchTree/BSTNode.h
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.embed.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.embed.manifest.res
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BinarySearchTree.exe.intermediate.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Debug/BuildLog.htm
5080309812_黄博_第三次作业/BinarySearchTree/Debug/main.obj
5080309812_黄博_第三次作业/BinarySearchTree/Debug/mt.dep
5080309812_黄博_第三次作业/BinarySearchTree/Debug/vc90.idb
5080309812_黄博_第三次作业/BinarySearchTree/Debug/vc90.pdb
5080309812_黄博_第三次作业/BinarySearchTree/main.cpp
5080309812_黄博_第三次作业/BinarySearchTree/Release/BinarySearchTree.exe.intermediate.manifest
5080309812_黄博_第三次作业/BinarySearchTree/Release/BuildLog.htm
5080309812_黄博_第三次作业/BinarySearchTree/Release/main.obj
5080309812_黄博_第三次作业/BinarySearchTree/Release/mt.dep
5080309812_黄博_第三次作业/BinarySearchTree/Release/vc90.idb
5080309812_黄博_第三次作业/BinarySearchTree/Release/vc90.pdb
5080309812_黄博_第三次作业/BinarySearchTree.ncb
5080309812_黄博_第三次作业/BinarySearchTree.sln
5080309812_黄博_第三次作业/BinarySearchTree.suo
5080309812_黄博_第三次作业/Debug/BinarySearchTree.exe
5080309812_黄博_第三次作业/Debug/BinarySearchTree.ilk
5080309812_黄博_第三次作业/Debug/BinarySearchTree.pdb
5080309812_黄博_第三次作业/Release/BinarySearchTree.exe
5080309812_黄博_第三次作业/Release/BinarySearchTree.pdb
5080309812_黄博_第三次作业/BinarySearchTree/Debug
5080309812_黄博_第三次作业/BinarySearchTree/Release
5080309812_黄博_第三次作业/BinarySearchTree
5080309812_黄博_第三次作业/Debug
5080309812_黄博_第三次作业/Release
5080309812_黄博_第三次作业
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.