文件名称:Binary-tree-traversal-algorithm
介绍说明--下载内容均来自于网络,请自行研究使用
二叉树的遍历有常用的三种方法,分别是:先根次序、中根次序、后根次序。为了验证这几种遍历算法的区别,本次的实验将会实现所有的算法。
遍历的时候,把结点的信息打印出来,为了让结点的信息更容易区别,在每个结点前加上数字标识。如:data[1]=A,data[2]=B.
实现的算法皆为递归算法
-Binary tree traversal has used three methods, namely: first, the root sequence, the order of the root, root, after the order. In order to verify the difference between these types of traversal algorithm, this experiment will achieve all of the algorithms. Through time, to print out the information nodes, node information to make it easier for the difference, with each node before the digital ID. Such as: data [1] = A, data [2] = B. The algorithms are all recursive algorithm to achieve
遍历的时候,把结点的信息打印出来,为了让结点的信息更容易区别,在每个结点前加上数字标识。如:data[1]=A,data[2]=B.
实现的算法皆为递归算法
-Binary tree traversal has used three methods, namely: first, the root sequence, the order of the root, root, after the order. In order to verify the difference between these types of traversal algorithm, this experiment will achieve all of the algorithms. Through time, to print out the information nodes, node information to make it easier for the difference, with each node before the digital ID. Such as: data [1] = A, data [2] = B. The algorithms are all recursive algorithm to achieve
(系统自动生成,下载前可以参看下载内容)
下载文件列表
二叉树遍历算法——程序设计.docx