摘要
论述了二叉树后序遍历的递归算法和非递归算法,对递归算法中的工作栈的执行过程做了分析。但递归算法在执行过程会耗费太多的时间和空间,为了追求算法的时空效率,必须将递归算法转化为非递归算法,问题才能得到有效解决,在执行过程中给出了改进非递归化算法。
The article presents the recursive and non - recursive algorithms of postorded - traversing binary recursive algorithm into a non - recursive algorithm for time and space efficiency. For this, the alter of stack executing recursive algorithm is discussed, and the improvement of non - recursive algorithm is also given.
出处
《安徽电气工程职业技术学院学报》
2006年第1期80-83,共4页
Journal of Anhui Electrical Engineering Professional Technique College
关键词
二叉树
递归算法
栈
遍历
非递归算法
binary tree
recursive algorithm
stack
traversing
non - recursive algorithm