文件名称:问题 J

  • 所属分类:
  • 其他小程序
  • 资源属性:
  • 上传时间:
  • 2017-12-25
  • 文件大小:
  • 16kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • Lucyluc********
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

顺序方式存储的完全二叉树进行重建
题目描述
按顺序方式存储的一棵完全二叉树的结点记录,结点个数为n。根据所输入的顺序结构的结点记录建立二叉树,输出树的先序,中序和后序遍历结果。
注:数字“0”表示不存在此结点,没有孩子结点。
输入
树结点个数n
顺序方式存储的完全二叉树
输出
先序遍历输出
中序遍历输出
后序遍历输出
样例输入
10
1 2 0 3 4 0 0 5 6 7
样例输出
1 2 3 5 6 4 7
5 3 6 2 7 4 1
5 6 3 7 4 2 1(Title Descr iption
The node record of a complete two - fork tree is stored in a sequential way, with a node number of n. The two forked tree is set up according to the node record of the input sequence structure. The first order, the middle order and the post order of the output tree are traversed.
Note: the number "0" indicates that there is no such node and there is no child node.
input
The number of tree nodes n
A complete two forked tree stored in a sequential way
output
Preface ergodic output
Middle sequence ergodic output
Post sequence ergodic output
sample input
Ten
1203400567
sample output
1235647
5362741
5637421)
(系统自动生成,下载前可以参看下载内容)

下载文件列表

文件名大小更新时间
问题 J.docx 19360 2017-10-25

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org