文件名称:4
-
所属分类:
- 标签属性:
- 上传时间:2013-06-05
-
文件大小:882.36kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编程任务:
对于给定的树,以根结点为起点,对树实现非递归方式广度优先搜索,输出广度优
先搜索序列
数据输入:
由文件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/
实验四/Debug/bfs.obj
实验四/Debug/input.txt
实验四/Debug/main.obj
实验四/Debug/output.txt
实验四/Debug/vc60.idb
实验四/Debug/vc60.pdb
实验四/Debug/实验四.exe
实验四/Debug/实验四.ilk
实验四/Debug/实验四.pch
实验四/Debug/实验四.pdb
实验四/input.txt
实验四/main.cpp
实验四/output.txt
实验四/实验四.dsp
实验四/实验四.dsw
实验四/实验四.ncb
实验四/实验四.opt
实验四/实验四.plg
实验四/bfs.cpp
实验四/BFS.H
实验四/Debug/
实验四/Debug/bfs.obj
实验四/Debug/input.txt
实验四/Debug/main.obj
实验四/Debug/output.txt
实验四/Debug/vc60.idb
实验四/Debug/vc60.pdb
实验四/Debug/实验四.exe
实验四/Debug/实验四.ilk
实验四/Debug/实验四.pch
实验四/Debug/实验四.pdb
实验四/input.txt
实验四/main.cpp
实验四/output.txt
实验四/实验四.dsp
实验四/实验四.dsw
实验四/实验四.ncb
实验四/实验四.opt
实验四/实验四.plg
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.