期刊文献+

由遍历结果还原二叉树的递归算法

The Recursive Algorithm of Creating Binary Tree Based on Traversing
下载PDF
导出
摘要 二叉树的遍历操作和其它操作的算法实现,都必须先创建二叉树。分析常规创建二叉树方法的特点和不足,给出利用中序遍历和后序遍历结果还原二叉树的算法,利用这一方法,给出由前序遍历和后序遍历还原二叉树的算法,最后,提供利用次层遍历和中序遍历还原二叉树的算法。 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-traversing and in-order-traversing.
作者 陈文
出处 《电脑知识与技术》 2009年第6X期4759-4761,共3页 Computer Knowledge and Technology
关键词 二叉树 递归 遍历 binary tree recursive traversing
  • 相关文献

参考文献1

  • 1盛魁.二叉树的遍历探究与应用[J].电脑知识与技术.2008(23) 被引量:1

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部