文件名称: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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.