题目描述:
A robot is located at the top-left corner of a m x n grid (marked ‘Start’ in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked ‘Finish’ in the diagram below).
How many possible unique paths are there?
题目大意:
- 如图所示,题目会给你两个整数,代表了图中格子的尺寸,m是有多少列,n是有多少行
- 有一个机器人,站在格子的左上角,右下角有一个目的地,然而它只能向右或向下行进
- 问你,会有多少不同的路径可以选
解题思路:
- 首先这是一道归结于动态规划标签下的题目,那就必然带有动态规划的特色与味道
- 什么意思?一般那就是当时的状态必定能由前一种状态,由某种公式推导出来
- 最开始本人想法是,无论你在哪,你不是就有两种可能吗,无非