摘要: 203. 移除链表元素 https://leetcode.cn/problems/remove-linked-list-elements/description/ public ListNode removeElements(ListNode head, int val) { if (head == 阅读全文
posted @ 2024-03-08 23:44 jeasonGo 阅读(14) 评论(0) 推荐(0)
摘要: 1.两数之和 https://leetcode.cn/problems/two-sum/description/?envType=study-plan-v2&envId=top-100-liked public int[] twoSum(int[] nums, int target) { HashM 阅读全文
posted @ 2024-03-07 16:53 jeasonGo 阅读(25) 评论(0) 推荐(0)
摘要: 977.有序数组的平方 https://leetcode.cn/problems/squares-of-a-sorted-array/description/ public static int[] sortedSquares(int[] nums){ int left = 0; int right 阅读全文
posted @ 2024-03-07 12:08 jeasonGo 阅读(27) 评论(0) 推荐(0)
摘要: 1768.交替合并字符串 https://leetcode.cn/problems/merge-strings-alternately/description/?envType=study-plan-v2&envId=leetcode-75 public String mergeAlternatel 阅读全文
posted @ 2024-03-06 12:50 jeasonGo 阅读(26) 评论(0) 推荐(0)
摘要: 704.二分查找 https://leetcode.cn/problems/binary-search/description/ 一、左闭右闭 `//左闭右闭 public static int erFen1(int[] nums,int target){ if (target < nums[0] 阅读全文
posted @ 2024-03-06 10:34 jeasonGo 阅读(34) 评论(0) 推荐(0)