期刊文献+

构造二叉树的两个改进算法 被引量:2

Two Improved Algorithms for Constructing Binary Tree
下载PDF
导出
摘要 在数据结构中,已知一棵二叉树的先序序列和中序序列,可唯一确定此二叉树。本文在分析建立二叉树经典算法的时间复杂度的基础上,给出了两个改进算法:①利用哈希函数,使得改进后的算法在最差情况下,时间复杂度由O(n2)降为O(n);②利用栈和控制输入的结点序列构造二叉树,时间复杂度也由O(n2)降为O(n)。 In the data structure,the binary tree can be uniquely confirmed when the nodes sequences of this binary tree for preorder traversal and inorder traversal are knows. In this thetis, an algorithm of creating binary tree is analyzed. Two improved algorithms are given. The time complexity of the improved algorithm goes down from O(n^2) to O(n).
作者 赵素萍
机构地区 洛阳师范学院
出处 《现代计算机》 2006年第10期99-101,共3页 Modern Computer
关键词 先序序列 中序序列 二叉树 哈希函数 时间复杂度 Preorder Traversal Inorder Traversal Binary Tree Hash Function Stack Time Complexity
  • 相关文献

参考文献6

二级参考文献15

  • 1William Ford william Topp.Data Structures With C++[M].北京:清华大学出版社,1997..
  • 2Richard C Leinecker等 张艳等(译).Visual C++6宝典[M].北京:电子工业出版社,1999..
  • 3娄定俊.算法分析与设计[M].广州:中山大学出版社,1998..
  • 4克努特D E 管纪文 苏运霖译.计算机程序设计技巧(第一卷基本算法)[M].北京:国防工业出版社,1980.277.
  • 5Corman T H,Leisern C E. Introduction to algorithms. The MIT Press, 1995.
  • 6Pieprzyh J,Sadeghiyan. Design B of hashing algorithms. Berlin: Springer-verlag, 1993.
  • 7Baase A, Gelder A V. Computer algorithms: Introduction to design and analysis. Higher Education Press,2001.
  • 8袁蒲佳,数据结构,1991年
  • 9管纪文,计算机程序设计技巧.1,1980年
  • 10施伯乐,数据结构,1988年

共引文献33

同被引文献3

引证文献2

二级引证文献4

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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