文件名称:REBUILD-BINARY-TREE.cpp
-
所属分类:
- 标签属性:
- 上传时间:2014-12-16
-
文件大小:1.18kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
我们知道如何按照三种深度优先次序来周游一棵二叉树,来得到中根序列、前根序列和后根序列。反过来,如果给定二叉树的中根序列和后根序列,或者给定中根序列和前根序列,可以重建一二叉树。本题输入一棵二叉树的中根序列和后根序列,要求在内存中重建二叉树,最后输出这棵二叉树的前根序列。
用不同的整数来唯一标识二叉树的每一个结点,下面的二叉树
中根序列是9 5 32 67
后根序列9 32 67 5
前根序列5 9 67 32
-We know how to prioritize according to three kinds of depth to travel around a binary tree to get the root sequence, sequence and ventral root root sequence. Conversely, if a given sequence of binary tree root and root sequence, or a given sequence and anterior root root sequence, you can rebuild a binary tree. The title input binary tree root root sequence after sequence and require rebuilding binary tree in memory before the final output binary tree root sequence. Different integer that uniquely identifies each node of a binary tree, the following sequence is a binary tree roots before 932,675 953,267 root sequence after sequence 596 732 root
用不同的整数来唯一标识二叉树的每一个结点,下面的二叉树
中根序列是9 5 32 67
后根序列9 32 67 5
前根序列5 9 67 32
-We know how to prioritize according to three kinds of depth to travel around a binary tree to get the root sequence, sequence and ventral root root sequence. Conversely, if a given sequence of binary tree root and root sequence, or a given sequence and anterior root root sequence, you can rebuild a binary tree. The title input binary tree root root sequence after sequence and require rebuilding binary tree in memory before the final output binary tree root sequence. Different integer that uniquely identifies each node of a binary tree, the following sequence is a binary tree roots before 932,675 953,267 root sequence after sequence 596 732 root
(系统自动生成,下载前可以参看下载内容)
下载文件列表
REBUILD BINARY TREE.cpp
__MACOSX/
__MACOSX/._REBUILD BINARY TREE.cpp
__MACOSX/
__MACOSX/._REBUILD BINARY TREE.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.