上一页 1 2 3 4 5 6 7 8 9 10 ··· 25 下一页
  2022年4月7日
摘要: package leetcode; public class offer_29 { public int[] spiralOrder(int[][] matrix) { //空数组 if(matrix==null||matrix.length==0||matrix[0].length==0) {re 阅读全文
posted @ 2022-04-07 11:05 一仟零一夜丶 阅读(22) 评论(0) 推荐(0)
摘要: package leetcode; public class demo_147 { public ListNode insertionSortList(ListNode head) { //最多有一个节点的链表直接返回 if(head==null||head.next==null) { return 阅读全文
posted @ 2022-04-07 09:55 一仟零一夜丶 阅读(30) 评论(0) 推荐(0)
  2022年4月3日
摘要: package leetcode; import java.util.Stack; public class offer_31 { public boolean validateStackSequences(int[] pushed, int[] popped) { //用一个栈模拟进栈顺序 Sta 阅读全文
posted @ 2022-04-03 19:58 一仟零一夜丶 阅读(15) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.Queue; public class demo_102 { publ 阅读全文
posted @ 2022-04-03 14:29 一仟零一夜丶 阅读(25) 评论(0) 推荐(0)
  2022年4月2日
摘要: package leetcode; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class demo_145 { public List<Integer> postorderTra 阅读全文
posted @ 2022-04-02 11:36 一仟零一夜丶 阅读(31) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class demo_144 { public List<Integer> preorderTrav 阅读全文
posted @ 2022-04-02 10:07 一仟零一夜丶 阅读(25) 评论(0) 推荐(0)
  2022年4月1日
摘要: package leetcode; public class offer_60 { public double[] dicesProbability(int n) { double[] ans=new double[5*n+1]; //dp表示n个骰子得出和为s的个数 int[][] dp=new 阅读全文
posted @ 2022-04-01 16:10 一仟零一夜丶 阅读(18) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_49 { public int nthUglyNumber(int n) { int[] dp=new int[n+1]; dp[1]=1; int i=1, j=1,k=1; //所以丑数分别乘以2,3,5,每次取当前位置的 阅读全文
posted @ 2022-04-01 10:08 一仟零一夜丶 阅读(18) 评论(0) 推荐(0)
  2022年3月31日
摘要: package leetcode; import java.util.ArrayList; import java.util.Arrays; public class offer_38 { public String[] permutation(String s) { //将字符串转换成数组并排序 阅读全文
posted @ 2022-03-31 11:39 一仟零一夜丶 阅读(23) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.LinkedList; import java.util.Queue; public class offer_59_2 { Queue<Integer> que1; LinkedList<Integer> que2; public 阅读全文
posted @ 2022-03-31 10:16 一仟零一夜丶 阅读(17) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 25 下一页