摘要:
203.移除链表元素 方法一:直接遍历,永远记得处理head, 删除链表必须有前驱。 /** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() 阅读全文
posted @ 2024-08-16 17:32
爱刷题的小盒子
阅读(326)
评论(0)
推荐(0)
摘要:
209.长度最小的子数组 class Solution { public int minSubArrayLen(int target, int[] nums) { int left = 0; int sum = 0; //int result = Integer.MAX_VALUE;无法编译,改成长 阅读全文
posted @ 2024-08-16 15:30
爱刷题的小盒子
阅读(301)
评论(0)
推荐(0)