文件名称:homework
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.01kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
已知一棵排序二叉树,树中结点的形式为:
data info left right
其中,data 给出结点的数据场,info 给出本结点的左子树中的结点总数,left和 right 分别给出本结点的左儿子和右儿子的地址。数据场data 和info的类型皆为 int。又已知该二叉排序树的根结点的地址为 root。请设计二个函数,分别实现下述功能:
1. 按递增序找出该二叉排序树中的第 i 个小的结点。
2. 插入数据场之值为 x 的结点,并仍应保持该二叉排序树的性质不
变。
-Known a sort tree, the tree nodes in the form: data info left right one, data given node data field, info given in the left sub-tree nodes in the total number of nodes, left and nodes are given the right 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 value of x nodes, and should maintain the binary sort tree, the nature of the change.
data info left right
其中,data 给出结点的数据场,info 给出本结点的左子树中的结点总数,left和 right 分别给出本结点的左儿子和右儿子的地址。数据场data 和info的类型皆为 int。又已知该二叉排序树的根结点的地址为 root。请设计二个函数,分别实现下述功能:
1. 按递增序找出该二叉排序树中的第 i 个小的结点。
2. 插入数据场之值为 x 的结点,并仍应保持该二叉排序树的性质不
变。
-Known a sort tree, the tree nodes in the form: data info left right one, data given node data field, info given in the left sub-tree nodes in the total number of nodes, left and nodes are given the right 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 value of x nodes, and should maintain the binary sort tree, the nature of the change.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
作业3.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.