文件名称:4
介绍说明--下载内容均来自于网络,请自行研究使用
(1)已知一棵完全二叉树存放于一个一维数组T[n]中,T[n]中存放的是各结点的值。试设计一个算法,从T[0]开始顺序读出各结点的值,建立该二叉树的二叉链表表示。
(2)二叉树的双序遍历(Double-order traversal)是指:对于二叉树的每一个结点来说,先访问这个结点,再按双序遍历它的左子树,然后再一次访问这个结点,接下来按双序遍历它的右子树。试写出执行这种双序遍历的算法。
-(1) known to a complete binary tree stored in a one-dimensional array T [n] in, T [n] is stored in the value of each node. Try to design an algorithm, from T [0] started in order to read out the value of each node to build the binary tree binary list said. (2) two-order binary tree traversal (Double-order traversal) is: For each binary tree node, the first visit to this node, and then double-traversing its left subtree, and then visit this node, followed by two-order traversal of its right subtree. Write down the implementation of this two-order traversal algorithm.
(2)二叉树的双序遍历(Double-order traversal)是指:对于二叉树的每一个结点来说,先访问这个结点,再按双序遍历它的左子树,然后再一次访问这个结点,接下来按双序遍历它的右子树。试写出执行这种双序遍历的算法。
-(1) known to a complete binary tree stored in a one-dimensional array T [n] in, T [n] is stored in the value of each node. Try to design an algorithm, from T [0] started in order to read out the value of each node to build the binary tree binary list said. (2) two-order binary tree traversal (Double-order traversal) is: For each binary tree node, the first visit to this node, and then double-traversing its left subtree, and then visit this node, followed by two-order traversal of its right subtree. Write down the implementation of this two-order traversal algorithm.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
4.cpp