Unique Paths
A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below).
The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked 'Finish' in the diagram below).
How many possible unique paths are there?
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 public class Solution { 2 public int uniquePaths(int m, int n) { 3 int steps[]=new int[n]; 4 steps[0]=1; 5 for(int i=0;i<m;i++){ 6 for(int j=1;j<n;j++){ 7 steps[j] = steps[j]+steps[j-1]; 8 } 9 } 10 return steps[n-1]; 11 } 12 }
row should from 0