A robot is located at the top-left corner of amxngrid (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?
常规做法dp, 发现一个大神用组合的方式, Cnk , 从start 到end 有m+n-2 步要走, 向下走m-1步。
m+n-2 中向下走m-1 的组合方式 有C(m+n-2) (m-1) 种