文件名称:tree
-
所属分类:
- 标签属性:
- 上传时间:2012-10-31
-
文件大小:1.13kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
假设以如下说明的三元组 (F、C、L/R) 序列输入一棵二叉树的诸边(其中 F 表示双亲结点的标识,C 表示孩子结点标识,L/R 表示 C 为 F 的左孩子或右孩子),且在输入的三元组序列中,C 是按层次顺序出现的。设结点的标识是字符类型。F=‘^’时 C 为根结点标识,若 C 亦为‘^’,则表示输入结束。试编写算法,由输入的三元组序列建立二叉树的二叉链表,并以中序序列输出。
^AL ABL ACR BDL CEL
CFR DGR FHL ^^L
-Assuming the following descr iption of the triple (F, C, L/R) sequence of a binary tree of all the input side (where F that identifies the parent node, C, said child node ID, L/R that C is F, left or right child child), and triples in the input sequence, C is the emergence of a hierarchical order. Node identity is established character types. F = ' ^' C for the root identity when, if C is also a ' ^' , then enter the end. Test preparation algorithm, the input sequence of triples binary build the binary tree list, and in order to sequence the output. ^ AL ABL ACR BDL CEL CFR DGR FHL ^ ^ L
^AL ABL ACR BDL CEL
CFR DGR FHL ^^L
-Assuming the following descr iption of the triple (F, C, L/R) sequence of a binary tree of all the input side (where F that identifies the parent node, C, said child node ID, L/R that C is F, left or right child child), and triples in the input sequence, C is the emergence of a hierarchical order. Node identity is established character types. F = ' ^' C for the root identity when, if C is also a ' ^' , then enter the end. Test preparation algorithm, the input sequence of triples binary build the binary tree list, and in order to sequence the output. ^ AL ABL ACR BDL CEL CFR DGR FHL ^ ^ L
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tree.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.