上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页
  2022年3月13日
摘要: package leetcode; public class offer_52 { public ListNode getIntersectionNode(ListNode headA, ListNode headB) { //将A链表拼接在B链表后,将B链表拼接在A链表后 ListNode nod 阅读全文
posted @ 2022-03-13 16:24 一仟零一夜丶 阅读(25) 评论(0) 推荐(0)
  2022年3月12日
摘要: package leetcode; import java.util.ArrayList; import java.util.List; import java.util.Stack; public class demo_94 { //递归遍历 public List<Integer> inorde 阅读全文
posted @ 2022-03-12 11:35 一仟零一夜丶 阅读(24) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_22 { public ListNode getKthFromEnd(ListNode head, int k) { //快慢指针,让快指针先走k个节点,当快指针走到最后一个时,满指针就为倒数第k个 ListNode node 阅读全文
posted @ 2022-03-12 11:15 一仟零一夜丶 阅读(25) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_18 { public ListNode deleteNode(ListNode head, int val) { //头结点值为val,则删除头结点 if(head.val==val) { return head.next; 阅读全文
posted @ 2022-03-12 10:23 一仟零一夜丶 阅读(17) 评论(0) 推荐(0)
  2022年3月11日
摘要: package leetcode; import java.util.HashSet; import java.util.Set; public class offer_48 { public int lengthOfLongestSubstring(String s) { if(s.equals( 阅读全文
posted @ 2022-03-11 17:12 一仟零一夜丶 阅读(21) 评论(0) 推荐(0)
摘要: package leetcode; import java.util.HashSet; import java.util.Set; public class offer_48 { public int lengthOfLongestSubstring(String s) { if(s.equals( 阅读全文
posted @ 2022-03-11 17:11 一仟零一夜丶 阅读(34) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_46 { public int translateNum(int num) { //爬楼梯问题,每次截取两个数字相当于爬两层,需要判断是否能够爬两层 String str=String.valueOf(num); int dp 阅读全文
posted @ 2022-03-11 15:29 一仟零一夜丶 阅读(28) 评论(0) 推荐(0)
  2022年3月10日
摘要: package leetcode; public class offer_47 { public int maxValue(int[][] grid) { int hight=grid.length; int width=grid[0].length; int[][] dp=new int[high 阅读全文
posted @ 2022-03-10 14:43 一仟零一夜丶 阅读(26) 评论(0) 推荐(0)
摘要: package leetcode; public class offer_42 { public int maxSubArray(int[] nums) { //记录当前所经历子数组和的最大值 int maxnum=nums[0]; //记录当前所经历子数组和 int num=nums[0]; fo 阅读全文
posted @ 2022-03-10 11:28 一仟零一夜丶 阅读(18) 评论(0) 推荐(0)
  2022年3月9日
摘要: package leetcode; public class offer_63 { public int maxProfit(int[] prices) { if(prices.length<0||prices==null) { return 0; } int[] dp=new int[prices 阅读全文
posted @ 2022-03-09 11:27 一仟零一夜丶 阅读(18) 评论(0) 推荐(0)
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页