LeetCode 62. Unique Paths
2017-02-16 20:05
519 查看
public class Solution { public int uniquePaths(int m, int n) { int[][] paths = new int[m] ; for (int i = 0; i < m; i++) { for (int j = 0; j < n; j++) { if (i == 0 || j == 0) paths[i][j] = 1; else paths[i][j] = paths[i - 1][j] + paths[i][j - 1]; } } return paths[m - 1][n - 1]; } }
相关文章推荐
- [Leetcode] 62. Unique Paths
- Leetcode 62. Unique Paths
- 【leetcode】62. Unique Paths
- [Leetcode]@python 62. Unique Paths
- leetcode.array--62. Unique Paths
- leetcode_middle_48_62. Unique Paths
- Leetcode:62. Unique Paths
- [LeetCode] 62. Unique Paths
- LeetCode *** 62. Unique Paths
- leetCode刷题归纳-Dynamic Programming(62. Unique Paths)
- [LeetCode] 62. Unique Paths
- leetcode 62. Unique Paths
- leetcode解题报告:62. Unique Paths
- LeetCode 62. Unique Paths
- Leetcode 62. Unique Paths
- leetcode: 62. Unique Paths
- Leetcode 62. Unique Paths
- leetcode题解-561. Array Partition I && 62. Unique Paths && 63. Unique Paths II
- LeetCode 62. Unique Paths (Python)最优解--Apolo_Shane
- <LeetCode OJ> 62. Unique Paths