所谓遍历(Traversal)是指沿着某条搜索路线,依次对树中每个结点均做一次且仅做一次访问。访问结点所做的操作依赖于具体的应用问 题。遍历是二叉树上最重要的运算之一,是二叉树上进行其它运算之基础。
二叉树遍历的非递归算法相对于递归算法,减少了函数调用等开销,具有性能优势。
Compared with recursive algorithm for binary tree traversing, non-recursive algorithm reduces expenses of function calls, gains performance advantage.
对二叉树的遍历过程进行深入地研究,提出一种生成二叉树遍历序列的新方法,解决了二叉树遍历序列的生成问题。
By careful researches of the traversal of binary tree, a new method of traversing binary tree is brought forward, which is able to solve the problem of traversal of binary tree.
本文将对满二叉树的结构进行深入分析,采用深度遍历与广度遍历两种途径给出递推关系式。
This paper goes deeply into such tree's structure using both depth search and breadth search, and gives recursive relationship separately.
应用推荐