文件名称:path
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:5.66kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
探询路径
问题的提出:编写程序,输出下图的0至n(1<=n&&n>=9)的所有路径。
该题的核心是找出满足一定规律的递归条件,从而设计出递归算法。仔细分析不难发现规律:
0至n的路径由0至n-1的路径,加上n-1至n的路径,以及0至n-2的路径,加上n-2至n的路径这
两部分组成。即欲找0至n的路径,可以转化为找0至n-1及0至n-2的路径,这就可建立递归。-Explore the path
Of the problem: the preparation of procedures, under the map output from 0 to n (1 <= n & & n> = 9) of all paths.
The core of the problem is to find out the law to meet certain conditions recursive, so the design of recursive algorithm. Careful analysis of the law is not difficult to find:
The path from 0 to n from 0 to n-1 of the path, together with n-1 to n path, as well as 0 to n-2 path, together with n-2 to n the path of this
Composed of two parts.to find the path from 0 to n, can be transformed into looking for 0 to n-1 and 0 to n-2 path, which can establish a recursion.
问题的提出:编写程序,输出下图的0至n(1<=n&&n>=9)的所有路径。
该题的核心是找出满足一定规律的递归条件,从而设计出递归算法。仔细分析不难发现规律:
0至n的路径由0至n-1的路径,加上n-1至n的路径,以及0至n-2的路径,加上n-2至n的路径这
两部分组成。即欲找0至n的路径,可以转化为找0至n-1及0至n-2的路径,这就可建立递归。-Explore the path
Of the problem: the preparation of procedures, under the map output from 0 to n (1 <= n & & n> = 9) of all paths.
The core of the problem is to find out the law to meet certain conditions recursive, so the design of recursive algorithm. Careful analysis of the law is not difficult to find:
The path from 0 to n from 0 to n-1 of the path, together with n-1 to n path, as well as 0 to n-2 path, together with n-2 to n the path of this
Composed of two parts.to find the path from 0 to n, can be transformed into looking for 0 to n-1 and 0 to n-2 path, which can establish a recursion.
相关搜索: paths problem
(系统自动生成,下载前可以参看下载内容)
下载文件列表
探询路径/3_14.cpp
探询路径/3_14.dsp
探询路径/3_14.dsw
探询路径/3_14.ncb
探询路径/3_14.opt
探询路径/3_14.plg
探询路径/探询路径.txt
探询路径
探询路径/3_14.dsp
探询路径/3_14.dsw
探询路径/3_14.ncb
探询路径/3_14.opt
探询路径/3_14.plg
探询路径/探询路径.txt
探询路径
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.