问题描述:
Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner.
How many routes are there through a 2020 grid?
解决问题:
运用排列组合的知识,问题就是
(m+n)!/(m!*n!)
可以运用动态规划递归解决
扫描二维码关注公众号,回复:
1346339 查看本文章
public static int find(int a, int b){ if(a<0||b<0){ return 0; }else if(a==0&&b==0){ return 1; }else{ return find(a-1,b) + find(a, b-1); } }
但是运行。。。
所以需要转换为非递归的。。。
正在酝酿ing