文件名称:qq
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:2.38kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
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
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.