摄像有个机器人坐在X*Y网格的左上角,只能想右、向下移动。机器人从(0,0)到(X,Y)有多少种走法?
进阶
假设有些点为“禁区”,机器人不能踏足。设计一种算法,找出一条路径,让机器人从左上角移动到右下角。
这道题跟LeetCode上的Unique Paths 和Unique Paths II一样。
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 thr grid(marked 'Finish' in the diagram below).
How many possible unique paths are there?
NOTE: m and n will be at mo