```
public class Solution {
public int uniquePaths(int m, int n) {
if(m == 1 || n == 1 ){
return 1;
}
return uniquePaths2(m,n)+1;
}
public static int uniquePaths2(int m, int n) {
int path;
if(m == 1) {
return 0;
}
if(n == 1){
return 0;
}
return uniquePaths2(m-1, n) + uniquePaths2(m , n-1)+1;
}}
```

*what is the difference with*

```
public int getPath2(int m, int n) {
map = new int[m][n];
return unique(m - 1, n - 1);
}
private int unique(int m, int n) {
if (m == 0 || n == 0) return 1;
if (map[m][n] != 0) return map[m][n];
int s = unique(m, n - 1) + unique(m-1, n);
map[m][n] = s;
return s;
}
```

*I suck at the time stuff. Please help me.*