首页 | 本学科首页   官方微博 | 高级检索  
     

由遍历结果还原二叉树的递归算法
引用本文:陈文. 由遍历结果还原二叉树的递归算法[J]. 数字社区&智能家居, 2009, 0(18)
作者姓名:陈文
作者单位:福州职业技术学院计算机系;
摘    要:二叉树的遍历操作和其它操作的算法实现,都必须先创建二叉树。分析常规创建二叉树方法的特点和不足,给出利用中序遍历和后序遍历结果还原二叉树的算法,利用这一方法,给出由前序遍历和后序遍历还原二叉树的算法,最后,提供利用次层遍历和中序遍历还原二叉树的算法。

关 键 词:二叉树  递归  遍历  

The Recursive Algorithm of Creating Binary Tree Based on Traversing
CHEN Wen. The Recursive Algorithm of Creating Binary Tree Based on Traversing[J]. Digital Community & Smart Home, 2009, 0(18)
Authors:CHEN Wen
Affiliation:CHEN Wen (Department of Computer Fuzhou Polytechnic,Fuzhou 350108,China)
Abstract:Binary tree should be created while analyzing its traversing and other operation. Common method on creating binary tree is not convenience to use and it is analyzed in this paper. A recursive algorithm of creating binary tree based on in-order-traversing and post-or-der-traversing is proposed. By this way, this paper gives a recursive algorithm of creating binary tree based on in-order-traversing and pre-order-traversing. At last, it provides a recursive algorithm of creating binary tree based on level-trav...
Keywords:binary tree  recursive  traversing  
本文献已被 CNKI 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号