```
public int uniquePaths(int m, int n) {
long[] pos = new long[m * n];
pos[0] = 1;
for (int i =1;i<m*n;i++) pos[i] = (i%n==0?0:pos[i-1]) + ((i-n)>=0?pos[i-n]:0);
return (int)pos[m * n - 1];
}
```

hint:turn the coordinate value to pos = i*n+j; i belongs to 0 to m-1;j is 0 to n-1

hi

}