文件名称:qq
介绍说明--下载内容均来自于网络,请自行研究使用
1.输入带空二叉树(信息)的先序遍历序列,生成一棵二叉树;(若结点为字符类型,用空格表示空二叉树;若结点为整数类型,
用0(零)表示空二叉树)
2.作前序遍历,分别用递归算法、非递归算法实现;
3.作中序遍历,分别用递归算法、非递归算法实现;
4.作后序遍历,用递归算法实现;
5.求度分别为0、1、2的结点的数目,分别用递归算法、非递归
算法实现;
6.按层次遍历二叉树(提示:使用一个队列实现);
7.求二叉树的高度(深度);
-1. Enter with empty binary tree (information) of the first traversal sequence to generate a binary tree (if the node for the character type of binary tree by a space, said space node if an integer type, with 0 (zero) that the empty tree) 2. for the pre-order traversal, recursive algorithm, respectively, non-recursive algorithm 3. for in order traversal, recursive algorithm, respectively, non-recursive algorithm 4. traversal sequence for the latter, the recursive algorithm 5. 0,1,2 respectively for the number of nodes, respectively, using recursive algorithms, non-recursive algorithm 6. traversal according to the level of the Second-tree (hint: use a queue to achieve) 7. for tree height (depth)
用0(零)表示空二叉树)
2.作前序遍历,分别用递归算法、非递归算法实现;
3.作中序遍历,分别用递归算法、非递归算法实现;
4.作后序遍历,用递归算法实现;
5.求度分别为0、1、2的结点的数目,分别用递归算法、非递归
算法实现;
6.按层次遍历二叉树(提示:使用一个队列实现);
7.求二叉树的高度(深度);
-1. Enter with empty binary tree (information) of the first traversal sequence to generate a binary tree (if the node for the character type of binary tree by a space, said space node if an integer type, with 0 (zero) that the empty tree) 2. for the pre-order traversal, recursive algorithm, respectively, non-recursive algorithm 3. for in order traversal, recursive algorithm, respectively, non-recursive algorithm 4. traversal sequence for the latter, the recursive algorithm 5. 0,1,2 respectively for the number of nodes, respectively, using recursive algorithms, non-recursive algorithm 6. traversal according to the level of the Second-tree (hint: use a queue to achieve) 7. for tree height (depth)
(系统自动生成,下载前可以参看下载内容)
下载文件列表
qq.c