文件名称:binaryTree
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:1.32kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
求二叉树中从根结点到叶子节点的路径
//实现功能:
//2. 求二叉树中从根结点到叶子节点的路径
//需求分析:
//对于二叉树,分别用递归和非递归的方法编写程序完成如下功能:
//1. 输出所有的叶子结点的数据项值。
//2. 输出所有从叶子节点到根结点的路径
//3. 输出(2)中的第一条最长的路径
//程序存在的问题:数值只能输入0~9,其他基本满足要求
//测试数据先序输入:124 7 35 68 9-Find a binary tree from root to leaf node of the path// Function:// 2. Find a binary tree from root to leaf node of the path// needs analysis:// For binary trees, respectively, recursive and non recursive method to program the following functions:// 1. Output all leaf nodes of the data item value.// 2. Output from the leaf node to the root of all the path// 3. Output (2) The first of the longest path// Program problems: can only enter the value 0 to 9, to meet other basic requirements// test data input first order: 124,735,689
//实现功能:
//2. 求二叉树中从根结点到叶子节点的路径
//需求分析:
//对于二叉树,分别用递归和非递归的方法编写程序完成如下功能:
//1. 输出所有的叶子结点的数据项值。
//2. 输出所有从叶子节点到根结点的路径
//3. 输出(2)中的第一条最长的路径
//程序存在的问题:数值只能输入0~9,其他基本满足要求
//测试数据先序输入:124 7 35 68 9-Find a binary tree from root to leaf node of the path// Function:// 2. Find a binary tree from root to leaf node of the path// needs analysis:// For binary trees, respectively, recursive and non recursive method to program the following functions:// 1. Output all leaf nodes of the data item value.// 2. Output from the leaf node to the root of all the path// 3. Output (2) The first of the longest path// Program problems: can only enter the value 0 to 9, to meet other basic requirements// test data input first order: 124,735,689
(系统自动生成,下载前可以参看下载内容)
下载文件列表
binaryTree.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.