文件名称:4
- 所属分类:
- 软件工程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2013-06-05
- 文件大小:
- 882kb
- 下载次数:
- 0次
- 提 供 者:
- mi***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
编程任务:
对于给定的树,以根结点为起点,对树实现非递归方式广度优先搜索,输出广度优
先搜索序列
数据输入:
由文件input.txt给出输入数据。第1行有1个正整数n,表示给定的二叉树有n个顶
点,编号为1,2,…,n。接下来的n行中,每行有3个正整数a,b,c,分别表示编号为a的结
点的左儿子结点编号为b,右儿子结点编号为c,0表示没有儿子。各结点信息按照层序列表
的顺序给出。-Programming tasks: For a given of the tree, in order to root node as a starting point, right tree implementation non-recursive way of breadth-first search, the output breadth-first search sequence Data Input: by the file input.txt given input data. First 1 Line There are 1 positive integer n, represents a given binary tree with n vertices, numbered 1,2, ..., n. The following n row, each line has three positive integers a, b, c, respectively indicate the reference numbers as a, node point of a left son of node point number is b, right-his son node point number as the c, 0 indicates no sons. Each of the balance point information in accordance with the layer sequence the order of tables are given.
对于给定的树,以根结点为起点,对树实现非递归方式广度优先搜索,输出广度优
先搜索序列
数据输入:
由文件input.txt给出输入数据。第1行有1个正整数n,表示给定的二叉树有n个顶
点,编号为1,2,…,n。接下来的n行中,每行有3个正整数a,b,c,分别表示编号为a的结
点的左儿子结点编号为b,右儿子结点编号为c,0表示没有儿子。各结点信息按照层序列表
的顺序给出。-Programming tasks: For a given of the tree, in order to root node as a starting point, right tree implementation non-recursive way of breadth-first search, the output breadth-first search sequence Data Input: by the file input.txt given input data. First 1 Line There are 1 positive integer n, represents a given binary tree with n vertices, numbered 1,2, ..., n. The following n row, each line has three positive integers a, b, c, respectively indicate the reference numbers as a, node point of a left son of node point number is b, right-his son node point number as the c, 0 indicates no sons. Each of the balance point information in accordance with the layer sequence the order of tables are given.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
实验四
......\bfs.cpp
......\BFS.H
......\Debug
......\.....\bfs.obj
......\.....\input.txt
......\.....\main.obj
......\.....\output.txt
......\.....\vc60.idb
......\.....\vc60.pdb
......\.....\实验四.exe
......\.....\实验四.ilk
......\.....\实验四.pch
......\.....\实验四.pdb
......\input.txt
......\main.cpp
......\output.txt
......\实验四.dsp
......\实验四.dsw
......\实验四.ncb
......\实验四.opt
......\实验四.plg