recursion programming
1 public class Solution { 2 public int uniquePaths(int m, int n) { 3 // IMPORTANT: Please reset any member data you declared, as 4 // the same Solution instance will be reused for each test case. 5 int[][] result = new int[m+1][n+1]; 6 result[1][1] = 1; 7 for(int i = 1; i < m+1; i++) 8 for(int j = 1; j < n+1; j++){ 9 result[i][j] += result[i-1][j] + result[i][j-1]; 10 } 11 return result[m][n]; 12 } 13 }