期刊文献+

一种新的删除红黑树的结点的算法 被引量:6

A NEW ALGORITHM FOR DELETING A NODE FROM A RED-BLACK TREE
下载PDF
导出
摘要 提出一种新的删除红黑树的结点的算法,其主要思想是先自上而下处理某些子树再删除结点,不涉及自下而上的后退。证明新算法是正确的。设 n 是红黑树的内部结点的个数。执行新算法时进行 O(1)次旋转。新算法的时间复杂性是 O(log_2n)。实验结果表明新算法的平均执行时间比 Tarjan 的算法和 Cuibas-sedgewick 算法的短。新算法的空间复杂性是 O(1)。 A new algorithm for deleting a node from a red-black tree is presented, whose main idea is to process certain subtrees from above to below first and then to delete the node, without relating to the backtracking from below to above. The new algorithm is proved correct. Let n be the number of internal nodes of a red-black tree. O( 1 ) rotations are performed during the execution of the new algorithm. The time complexity of the new algorithm is O(log2n). Experimental results show that the average execution time of the new algorithm is shorter than that of both Tarjan' s algorithm and the Guibas-Sedgewick algorithm. The space complexity of the new algorithm is O( 1 ).
作者 唐自立
出处 《计算机应用与软件》 CSCD 北大核心 2006年第1期139-141,共3页 Computer Applications and Software
关键词 红黑树 对称二叉B-树 2-3-4树 准红黑树 黑高度 结点 删除 旋转 Red-black tree Symmetric binary B-tree 2-3-4 tree Almost-red-black tree Black-height Node Deletion Rotation
  • 相关文献

参考文献3

  • 1Cormen T. H. Leiserson C. E. Rivest R L, Stein C, Introduction to Algorithms[ M ] ,2nd ed, Cambridge, MA : MIT Press ,2001.
  • 2Weiss M. A, Data Structures and Algorithm Analysis in C ++ [ M] ,2nd ed, Reading, MA : Addlson-Wesley Longman, 1999.
  • 3唐自立.一种新的删除AVL树的结点的算法[J].计算机应用与软件,2005,22(4):107-109. 被引量:4

二级参考文献4

  • 1Knuth D.E.,The Art of Computer Programming,Vol.3:Sorting and Searching[M],2nd ed,Reading ,MA,Addison-Wesley,1998.
  • 2Kruse R.L.,Ryba A.J.,Data Structures and Program Design in C+ + [M],Upper Saddle River,NJ:Prentice Hall,1999.
  • 3陈琳.两个关于平衡树的结点删除算法.《计算机应用与软件》,1987,4(5):34-43.
  • 4唐自立.基于遍历序列的唯一确定树或二叉树的方法[J].小型微型计算机系统,2001,22(8):985-988. 被引量:11

共引文献3

同被引文献20

  • 1唐自立.一种新的删除AVL树的结点的算法[J].计算机应用与软件,2005,22(4):107-109. 被引量:4
  • 2唐自立.红黑树的高度[J].苏州大学学报(自然科学版),2006,22(3):33-36. 被引量:4
  • 3唐自立.一种新的删除HB(k)树的结点的算法[J].计算机工程与应用,2007,43(5):45-48. 被引量:2
  • 4Andersson A.Balanced search trees made simple [C]//Eecture Notes in Computer Science 709.Proceedings of the 3rd Workshop on Algorithms and Data Structures,London:Springer-Verlag, 1993:60-71.
  • 5Weiss M A.Data structures and algorithm analysis in C++[M].2nd ed.Reading,MA:Addison-Wesley Longman, 1999.
  • 6王涛,李舟军,胡小华,颜跃进,陈火旺.一种高效的数据流挖掘增量模糊决策树分类算法[J].计算机学报,2007,30(8):1244-1250. 被引量:18
  • 7CORMEN T H,LEISERSON C E,RIVEST R L,et al.Introduction to Algorithms[M].Cambridge,MA:MIT Press,2001.
  • 8BAASE S,GELDER A V.Computer Algorithms:Introduction to Design and Analysis[M].Reading,MA:Addison-Wesley Longman,2000.
  • 9SAHNI S.Data Structures,Algorithms,and Applications in C++[M].Boston:McGraw-Hill,1998.
  • 10COLLINS W J.Data Structures and the Standard Template Library[M].Boston:McGraw-Hill,2003.

引证文献6

二级引证文献12

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

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