文件名称:erchashu
介绍说明--下载内容均来自于网络,请自行研究使用
(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