上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页
  2021年6月4日
摘要: 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)
  2021年5月29日
摘要: package leetcode; import java.util.ArrayList; import java.util.Arrays; import java.util.Comparator; import java.util.List; public class demo_56 { publ 阅读全文
posted @ 2021-05-29 11:28 一仟零一夜丶 阅读(65) 评论(0) 推荐(0)
  2021年5月28日
摘要: package leetcode; public class demo_55 { public boolean canJump(int[] nums) { int end=nums.length-1; boolean flag=true; while(end>0) { int length=0; f 阅读全文
posted @ 2021-05-28 20:21 一仟零一夜丶 阅读(33) 评论(0) 推荐(0)
摘要: package leetcode; public class demo_50 { public double myPow(double x, int n) { if(n==0) {return 1.0;} if(n<0) { return 1.0/backtrack(x, -n); } return 阅读全文
posted @ 2021-05-28 19:23 一仟零一夜丶 阅读(50) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.ArrayList; import java.util.List; public class demo_22 { public List<String> generateParenthesis(int n) { List<Stri 阅读全文
posted @ 2021-05-28 16:06 一仟零一夜丶 阅读(54) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.ArrayList; import java.util.List; public class demo_54 { public List<Integer> spiralOrder(int[][] matrix) { List<In 阅读全文
posted @ 2021-05-28 14:52 一仟零一夜丶 阅读(55) 评论(0) 推荐(0)
  2021年5月22日
摘要: 1 package leetcode; 2 3 import java.util.Arrays; 4 5 public class demo_88 { 6 public void merge(int[] nums1, int m, int[] nums2, int n) { 7 //把nums2合并 阅读全文
posted @ 2021-05-22 11:27 一仟零一夜丶 阅读(47) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 25 下一页