文件名称:erchashu
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.41kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
(1)以回车( \n )为输入结束标志,输入数列L,生成一棵二叉排序树T;
(2)对二叉排序树T作中序遍历,输出结果;
(3)计算二叉排序树T查找成功的平均查找长度,输出结果;
(4)输入元素x,查找二叉排序树T,若存在含x的结点,则删除该结点,并作中序遍历(执行操作2);否则输出信息“x不存在”;
(5) 输入元素x,查找二叉排序树T,若整棵树不存在含值为x的结点,则插入该结点,并作中序遍历(执行操作2);否则输出信息“x已经存在”。
-(1) to return ( ' \ n' ) for the importation of the end of signs, the importation of series L, to generate a binary sort tree T (2) of the binary sort tree traversal of T for the output results (3 ) Calculation of binary sort tree T to find the average successful search length, the output results (4) input element x, to find binary sort tree T, if the existence of the node containing x, then delete the node, and sequencing of times calendar (2 steps) Otherwise output " x does not exist" (5) input element x, to find binary sort tree T, if the tree does not exist整棵with a value of x nodes, then insert the node, and for medium-traversal (2 steps) Otherwise output " x already exists."
(2)对二叉排序树T作中序遍历,输出结果;
(3)计算二叉排序树T查找成功的平均查找长度,输出结果;
(4)输入元素x,查找二叉排序树T,若存在含x的结点,则删除该结点,并作中序遍历(执行操作2);否则输出信息“x不存在”;
(5) 输入元素x,查找二叉排序树T,若整棵树不存在含值为x的结点,则插入该结点,并作中序遍历(执行操作2);否则输出信息“x已经存在”。
-(1) to return ( ' \ n' ) for the importation of the end of signs, the importation of series L, to generate a binary sort tree T (2) of the binary sort tree traversal of T for the output results (3 ) Calculation of binary sort tree T to find the average successful search length, the output results (4) input element x, to find binary sort tree T, if the existence of the node containing x, then delete the node, and sequencing of times calendar (2 steps) Otherwise output " x does not exist" (5) input element x, to find binary sort tree T, if the tree does not exist整棵with a value of x nodes, then insert the node, and for medium-traversal (2 steps) Otherwise output " x already exists."
相关搜索: erchashu
(系统自动生成,下载前可以参看下载内容)
下载文件列表
第一题.C
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
