摘要:
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space is marked as 1 and 0 respectively in the grid.For example,There is one obstacle in the middle of a 3x3 grid as illustrated below.[[0,0,0],[0, 阅读全文
摘要:
M*N grids from top-left to bottom-right find all the paths. 1 public static int UniquePaths(int m, int n) 2 { 3 int ret = 0; 4 FindAllPaths(m, n, ref ret); 5 return ret; 6 } 7 8 public static void FindAllPaths(int m, int n, ref int... 阅读全文