期刊文献+
共找到2篇文章
< 1 >
每页显示 20 50 100
二叉树递归遍历算法的平均运行时间 被引量:1
1
作者 乐晓波 汪琳 《湖南教育学院学报》 1997年第5期143-146,共4页
本文证明了对由随机插入结点而逐渐产生的二叉树进行遍历的递归算法的平均运行时间少于等于(n3+6n2十11n)/18,其中n为树的结点数.
关键词 二叉树 遍历 递归遍历算法 平均运行时间
下载PDF
Recursive and Nonrecursive Traversal Algorithms for Dynamically Created Binary Trees
2
作者 Robert Logozar 《Computer Technology and Application》 2012年第5期374-382,共9页
The modeling of dynamical systems from a time series implemented by our DSA program introduces binary trees of height D with all leaves on the same level, and the related subtrees of height L 〈 D. These are called e-... The modeling of dynamical systems from a time series implemented by our DSA program introduces binary trees of height D with all leaves on the same level, and the related subtrees of height L 〈 D. These are called e-trees and e-subtrees. The recursive and nonrecursive versions of the traversal algorithms for the trees with dynamically created nodes are discussed. The original nonrecursive algorithms that return the pointer to the next node in preorder, inorder and postorder traversals are presented. The space-time complexity analysis shows and the execution time measurements confirm that for these O(2D) algorithms, the recursive versions have approximately 10-25% better time constants. Still, the use of nonrecursive algorithms may be more appropriate in several occasions. 展开更多
关键词 Binary e-trees algorithms tree traversal PREORDER inorder postorder RECURSIVE nonrecursive space-time complexity.
下载PDF
上一页 1 下一页 到第
使用帮助 返回顶部