首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 二叉树与二叉链表

二叉树与二叉链表

  • 资源大小:1.13 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 数据结构 c++

资 源 简 介

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

文 件 列 表

tree.cpp
VIP VIP
0.172691s