62. Unique Paths

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?

例图

Example 1:

Example 2:

解法

动态规划

组合数

7 * 3 的方格中从左上角走到右下角一共 8 步,其中选 2 步向下,其余向右,一共 C82C_{8}^{2} 种选法。推广到 m * n 有,Cm+n2m1C_{m+n-2}^{m-1}

引用

Last updated

Was this helpful?