@@ -0,0 +1,432 @@
+// Question: https://leetcode.com/problems/unique-paths/description/%0A%0Apublic class UniquePaths %7B%0A  public int uniquePaths(int m, int n) %7B%0A    if (m == 1 %7C%7C n == 1) %7B%0A%0A      return 1;%0A    %7D%0A%0A    int%5B%5D%5B%5D map = new int%5Bm%5D%5Bn%5D;%0A    for (int i = 1; i %3C m; i++) %7B%0A      for (int j = 1; j %3C n; j++) %7B%0A        map%5Bi%5D%5Bj%5D = (i - 1 == 0 ? 1 : map%5Bi - 1%5D%5Bj%5D) + (j - 1 == 0 ? 1 : map%5Bi%5D%5Bj - 1%5D);%0A      %7D%0A    %7D%0A    return map%5Bm - 1%5D%5Bn - 1%5D;%0A  %7D%0A%7D%0A

Add 1 solution