文件名称:tree_sanyuanzu
介绍说明--下载内容均来自于网络,请自行研究使用
假设以如下说明的三元组 (F、C、L/R) 序列输入一棵二叉树的诸边(其中 F 表示双亲结点的标识,C 表示孩子结点标识,L/R 表示 C 为 F 的左孩子或右孩子),且在输入的三元组序列中,C 是按层次顺序出现的。设结点的标识是字符类型。F=‘^’时 C 为根结点标识,若 C 亦为‘^’,则表示输入结束。试编写算法,由输入的三元组序列建立二叉树的二叉链表,并以中序序列输出。 -Assumed that the input to the following descr iption of the ternary group (F, C, L/R) sequence of a binary tree plurilateral (wherein F represents the identity of the parent node, C represents the identity of the child node represents C, L/R F, The left child or right child), and the sequence of the input triples, C is a hierarchical order appears. The set node identification is a character type. F = ' ^' C is the root node identification, if C is also a ' ^' , it indicates the end of input. Try to write algorithms, the establishment of a binary tree binary list by the triples sequence input, and output inorder sequence.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
tree_sanyuanzu.cpp