2021年6月4日
摘要: package leetcode; public class demo_64 { public int minPathSum(int[][] grid) { int dp[][]=new int[grid.length][grid[0].length]; dp[0][0]=grid[0][0]; f 阅读全文
posted @ 2021-06-04 22:23 一仟零一夜丶 阅读(36) 评论(0) 推荐(0)
摘要: package leetcode; public class demo_63 { public int uniquePathsWithObstacles(int[][] obstacleGrid) { int[][] dp=new int[obstacleGrid.length][obstacleG 阅读全文
posted @ 2021-06-04 21:19 一仟零一夜丶 阅读(45) 评论(0) 推荐(0)
摘要: 1 package leetcode; 2 3 public class demo_62 { 4 public int uniquePaths(int m, int n) { 5 //记录到达每一个位置所需的步数 6 int dp[][]=new int[m][n]; 7 for(int i=0;i 阅读全文
posted @ 2021-06-04 20:02 一仟零一夜丶 阅读(37) 评论(0) 推荐(0)
摘要: package leetcode; public class demo_59 { public int[][] generateMatrix(int n) { int[][] array=new int[n][n]; int width=n; int height=n; int start=0; i 阅读全文
posted @ 2021-06-04 17:37 一仟零一夜丶 阅读(30) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.ArrayList; import java.util.List; public class demo_57 { public int[][] insert(int[][] intervals, int[] newInterval 阅读全文
posted @ 2021-06-04 16:47 一仟零一夜丶 阅读(51) 评论(0) 推荐(0)