登录
首页 » 数据结构 » 二叉树与二叉链表

二叉树与二叉链表

于 2022-09-25 发布 文件大小:1.13 kB
0 49
下载积分: 2 下载次数: 1

代码说明:

假设以如下说明的三元组 (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 description 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

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 696524资源总数
  • 103990会员总数
  • 18今日下载