文件名称:1111
介绍说明--下载内容来自于网络,使用问题请自行百度
二哥学了二叉树的顺序存储后,被下面一个问题难住了,于是他请你帮他解决。给你一个前序遍历和中序遍历,问顺序存储的数组是什么样子的。
Example
Input Format
第一行为前序遍历,第二行为中序遍历,节点个数不超过26.
Output Format
输出一行,表示顺序存储的数组,以空格隔开,NULL表示空节点,数组空间不超过1000个节点(The second order storage learned two tree, asked the next question, so he asks you to help him solve. Give you a preorder traversal and inorder traversal, ask the order of the storage of what the array is like.
Example
Input Format
The first behavior preorder traversal, second behavior in order traversal, the number of nodes is not more than 26.
Output Format
Output a row that represents the array of sequential storage, separated by space, NULL represents empty nodes, array space no more than 1000 nodes)
Example
Input Format
第一行为前序遍历,第二行为中序遍历,节点个数不超过26.
Output Format
输出一行,表示顺序存储的数组,以空格隔开,NULL表示空节点,数组空间不超过1000个节点(The second order storage learned two tree, asked the next question, so he asks you to help him solve. Give you a preorder traversal and inorder traversal, ask the order of the storage of what the array is like.
Example
Input Format
The first behavior preorder traversal, second behavior in order traversal, the number of nodes is not more than 26.
Output Format
Output a row that represents the array of sequential storage, separated by space, NULL represents empty nodes, array space no more than 1000 nodes)
相关搜索: 二叉树
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1111\1111.cbp
1111\1111.depend
1111\1111.layout
1111\bin\Debug\1111.exe
1111\main.cpp
1111\obj\Debug\main.o
1111\bin\Debug
1111\obj\Debug
1111\bin
1111\obj
1111
1111\1111.depend
1111\1111.layout
1111\bin\Debug\1111.exe
1111\main.cpp
1111\obj\Debug\main.o
1111\bin\Debug
1111\obj\Debug
1111\bin
1111\obj
1111
1999-2046 搜珍网 All Rights Reserved.
本站作为网络服务提供者,仅为网络服务对象提供信息存储空间,仅对用户上载内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
