From 289bf3153ba57449822230f7b4232f0a9f692faf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E8=B6=85?= Date: 2022年6月20日 13:55:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?Update=200443.=20=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E4=B8=B2.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...16213円347円274円251円345円255円227円347円254円246円344円270円262円.md" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/Solutions/0443. 345円216円213円347円274円251円345円255円227円347円254円246円344円270円262円.md" "b/Solutions/0443. 345円216円213円347円274円251円345円255円227円347円254円246円344円270円262円.md" index a0084aa6..f592f677 100644 --- "a/Solutions/0443. 345円216円213円347円274円251円345円255円227円347円254円246円344円270円262円.md" +++ "b/Solutions/0443. 345円216円213円347円274円251円345円255円227円347円254円246円344円270円262円.md" @@ -1,7 +1,7 @@ ## [0443. 压缩字符串](https://leetcode.cn/problems/string-compression/) -- 标签: -- 难度: +- 标签:双指针、字符串 +- 难度:中等 ## 题目大意 From b4371f7b279a9b3f4ab5cb4688575d3975cd42ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E8=B6=85?= Date: 2022年6月21日 18:11:44 +0800 Subject: [PATCH 2/4] =?UTF-8?q?Create=200082.=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=93=BE=E8=A1=A8=E4=B8=AD=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=85=83=E7=B4=A0=20II.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...345244円215円345円205円203円347円264円240円 II.md" | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 "Solutions/0082. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円 II.md" diff --git "a/Solutions/0082. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円 II.md" "b/Solutions/0082. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円 II.md" new file mode 100644 index 00000000..1dbb0383 --- /dev/null +++ "b/Solutions/0082. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円 II.md" @@ -0,0 +1,61 @@ +## [0082. 删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) + +- 标签:链表、双指针 +- 难度:中等 + +## 题目大意 + +**描述**:给定一个已排序的链表的头 `head`。 + +**要求**:删除原始链表中所有重复数字的节点,只留下不同的数字。返回已排序的链表。 + +**说明**: + +- 链表中节点数目在范围 $[0, 300]$ 内。 +- $-100 \le Node.val \le 100$。 +- 题目数据保证链表已经按升序排列。 + +**示例**: + +```Python +输入 head = [1,2,3,3,4,4,5] +输出 [1,2,5] +``` + +## 解题思路 + +### 思路 1:遍历 + +这道题的题意是需要保留所有不同数字,而重复出现的所有数字都要删除。因为给定的链表是升序排列的,所以我们要删除的重复元素在链表中的位置是连续的。所以我们可以对链表进行一次遍历,然后将连续的重复元素从链表中删除即可。具体步骤如下: + +- 先使用哑节点 `dummy_head` 构造一个指向 `head` 的指针,使得可以防止从 `head` 开始就是重复元素。 +- 然后使用指针 `cur` 表示链表中当前元素,从 `head` 开始遍历。 +- 当指针 `cur` 的下一个元素和下下一个元素存在时: + - 如果下一个元素值和下下一个元素值相同,则我们使用指针 `temp` 保存下一个元素,并使用 `temp` 向后遍历,跳过所有重复元素,然后令 `cur` 的下一个元素指向 `temp` 的下一个元素,继续向后遍历。 + - 如果下一个元素值和下下一个元素值不同,则令 `cur` 向右移动一位,继续向后遍历。 +- 当指针 `cur` 的下一个元素或者下下一个元素不存在时,说明已经遍历完,则返回哑节点 `dummy_head` 的下一个节点作为头节点。 + +### 思路 1:遍历代码 + +```Python +# Definition for singly-linked list. +# class ListNode: +# def __init__(self, val=0, next=None): +# self.val = val +# self.next = next +class Solution: + def deleteDuplicates(self, head: ListNode) -> ListNode: + dummy_head = ListNode(-1) + dummy_head.next = head + + cur = dummy_head + while cur.next and cur.next.next: + if cur.next.val == cur.next.next.val: + temp = cur.next + while temp and temp.next and temp.val == temp.next.val: + temp = temp.next + cur.next = temp.next + else: + cur = cur.next + return dummy_head.next +``` From b1b9acb60082af70821f4e9229a400322b7196ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E8=B6=85?= Date: 2022年6月21日 18:11:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?Update=200083.=20=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=8E=92=E5=BA=8F=E9=93=BE=E8=A1=A8=E4=B8=AD=E7=9A=84=E9=87=8D?= =?UTF-8?q?=E5=A4=8D=E5=85=83=E7=B4=A0.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...15345円244円215円345円205円203円347円264円240円.md" | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git "a/Solutions/0083. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円.md" "b/Solutions/0083. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円.md" index d99009f5..d23b3a11 100644 --- "a/Solutions/0083. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円.md" +++ "b/Solutions/0083. 345円210円240円351円231円244円346円216円222円345円272円217円351円223円276円350円241円250円344円270円255円347円232円204円351円207円215円345円244円215円345円205円203円347円264円240円.md" @@ -5,13 +5,34 @@ ## 题目大意 -给定一个升序排列好的链表,去除链表中的重复元素。 +**描述**:给定一个已排序的链表的头 `head`。 + +**要求**:删除所有重复的元素,使每个元素只出现一次。返回已排序的链表。 + +**说明**: + +- 链表中节点数目在范围 $[0, 300]$ 内。 +- $-100 \le Node.val \le 100$。 +- 题目数据保证链表已经按升序排列。 + +**示例**: + +```Python +输入 head = [1,1,2,3,3] +输出 [1,2,3] +``` ## 解题思路 -用指针 curr 遍历链表,判断当前元素的值和当前元素下一个节点元素值是否相等。如果相等,则让当前指针指向当前指针下两个节点。否则,curr 继续向后遍历。 +### 思路 1:遍历 + +- 使用指针 `curr` 遍历链表,先将 `head` 保存到 `curr` 指针。 +- 判断当前元素的值和当前元素下一个节点元素值是否相等。 +- 如果相等,则让当前指针指向当前指针下两个节点。 +- 否则,让 `curr` 继续向后遍历。 +- 遍历完之后返回头节点 `head`。 -## 代码 +### 思路 1:遍历代码 ```Python class Solution: From d1fd0d2ce889543e5c81f2e663d8840bd6433319 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E4=B8=96=E8=B6=85?= Date: 2022年6月21日 18:21:59 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=A2=98=E8=A7=A3?= =?UTF-8?q?=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Contents/00.Introduction/04.Solutions-List.md | 5 +++-- Contents/00.Introduction/05.Categories-List.md | 4 ++-- Contents/00.Introduction/06.Interview-100-List.md | 2 +- Contents/00.Introduction/07.Interview-200-List.md | 4 ++-- .../04.Array-Two-Pointers/02.Array-Two-Pointers-List.md | 2 +- .../01.Linked-List-Basic/02.Linked-List-Basic-List.md | 2 +- README.md | 2 +- 7 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Contents/00.Introduction/04.Solutions-List.md b/Contents/00.Introduction/04.Solutions-List.md index 4ee52258..1a478b65 100644 --- a/Contents/00.Introduction/04.Solutions-List.md +++ b/Contents/00.Introduction/04.Solutions-List.md @@ -1,4 +1,4 @@ -# LeetCode 题解(已完成 711 道) +# LeetCode 题解(已完成 712 道) | 题号 | 标题 | 题解 | 标签 | 难度 | | :------ | :------ | :------ | :------ | :------ | @@ -69,6 +69,7 @@ | 0079 | [单词搜索](https://leetcode.cn/problems/word-search/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0079.%20%E5%8D%95%E8%AF%8D%E6%90%9C%E7%B4%A2.md) | 数组、回溯算法 | 中等 | | 0080 | [删除有序数组中的重复项 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-array-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0080.%20%E5%88%A0%E9%99%A4%E6%9C%89%E5%BA%8F%E6%95%B0%E7%BB%84%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E9%A1%B9%20II.md) | 数组、双指针 | 中等 | | 0081 | [搜索旋转排序数组 II](https://leetcode.cn/problems/search-in-rotated-sorted-array-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0081.%20%E6%90%9C%E7%B4%A2%E6%97%8B%E8%BD%AC%E6%8E%92%E5%BA%8F%E6%95%B0%E7%BB%84%20II.md) | 数组、二分查找 | 中等 | +| 0082 | [删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0082.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0%20II.md) | 链表、双指针 | 中等 | | 0083 | [删除排序链表中的重复元素](https://leetcode.cn/problems/remove-duplicates-from-sorted-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0083.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0.md) | 链表 | 简单 | | 0084 | [柱状图中最大的矩形](https://leetcode.cn/problems/largest-rectangle-in-histogram/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0084.%20%E6%9F%B1%E7%8A%B6%E5%9B%BE%E4%B8%AD%E6%9C%80%E5%A4%A7%E7%9A%84%E7%9F%A9%E5%BD%A2.md) | 栈、数组、单调栈 | 困难 | | 0088 | [合并两个有序数组](https://leetcode.cn/problems/merge-sorted-array/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0088.%20%E5%90%88%E5%B9%B6%E4%B8%A4%E4%B8%AA%E6%9C%89%E5%BA%8F%E6%95%B0%E7%BB%84.md) | 数组、双指针 | 简单 | @@ -273,7 +274,7 @@ | 0435 | [无重叠区间](https://leetcode.cn/problems/non-overlapping-intervals/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0435.%20%E6%97%A0%E9%87%8D%E5%8F%A0%E5%8C%BA%E9%97%B4.md) | 贪心、数组、动态规划、排序 | 中等 | | 0437 | [路径总和 III](https://leetcode.cn/problems/path-sum-iii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0437.%20%E8%B7%AF%E5%BE%84%E6%80%BB%E5%92%8C%20III.md) | 树、深度优先搜索、二叉树 | 中等 | | 0438 | [找到字符串中所有字母异位词](https://leetcode.cn/problems/find-all-anagrams-in-a-string/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0438.%20%E6%89%BE%E5%88%B0%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%AD%E6%89%80%E6%9C%89%E5%AD%97%E6%AF%8D%E5%BC%82%E4%BD%8D%E8%AF%8D.md) | 哈希表、字符串、滑动窗口 | 中等 | -| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | | 简单 | +| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | 双指针、字符串 | 中等 | | 0445 | [两数相加 II](https://leetcode.cn/problems/add-two-numbers-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0445.%20%E4%B8%A4%E6%95%B0%E7%9B%B8%E5%8A%A0%20II.md) | 栈、链表、数学 | 中等 | | 0447 | [回旋镖的数量](https://leetcode.cn/problems/number-of-boomerangs/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0447.%20%E5%9B%9E%E6%97%8B%E9%95%96%E7%9A%84%E6%95%B0%E9%87%8F.md) | 哈希表、数学 | 中等 | | 0450 | [删除二叉搜索树中的节点](https://leetcode.cn/problems/delete-node-in-a-bst/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0450.%20%E5%88%A0%E9%99%A4%E4%BA%8C%E5%8F%89%E6%90%9C%E7%B4%A2%E6%A0%91%E4%B8%AD%E7%9A%84%E8%8A%82%E7%82%B9.md) | 树 | 中等 | diff --git a/Contents/00.Introduction/05.Categories-List.md b/Contents/00.Introduction/05.Categories-List.md index 916e4670..31746da9 100644 --- a/Contents/00.Introduction/05.Categories-List.md +++ b/Contents/00.Introduction/05.Categories-List.md @@ -188,7 +188,7 @@ | 0881 | [救生艇](https://leetcode.cn/problems/boats-to-save-people/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0881.%20%E6%95%91%E7%94%9F%E8%89%87.md) | 贪心、数组、双指针、排序 | 中等 | | 0042 | [接雨水](https://leetcode.cn/problems/trapping-rain-water/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0042.%20%E6%8E%A5%E9%9B%A8%E6%B0%B4.md) | 栈、数组、双指针、动态规划、单调栈 | 困难 | | 剑指 Offer 21 | [调整数组顺序使奇数位于偶数前面](https://leetcode.cn/problems/diao-zheng-shu-zu-shun-xu-shi-qi-shu-wei-yu-ou-shu-qian-mian-lcof/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/%E5%89%91%E6%8C%87%20Offer%2021.%20%E8%B0%83%E6%95%B4%E6%95%B0%E7%BB%84%E9%A1%BA%E5%BA%8F%E4%BD%BF%E5%A5%87%E6%95%B0%E4%BD%8D%E4%BA%8E%E5%81%B6%E6%95%B0%E5%89%8D%E9%9D%A2.md) | 数组、双指针、排序 | 简单 | -| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | | 简单 | +| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | 双指针、字符串 | 中等 | #### 快慢指针题目 @@ -273,7 +273,7 @@ | :------ | :------ | :------ | :------ | :------ | | 0707 | [设计链表](https://leetcode.cn/problems/design-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0707.%20%E8%AE%BE%E8%AE%A1%E9%93%BE%E8%A1%A8.md) | 链表 | 中等 | | 0083 | [删除排序链表中的重复元素](https://leetcode.cn/problems/remove-duplicates-from-sorted-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0083.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0.md) | 链表 | 简单 | -| 0082 | 删除排序链表中的重复元素 II | | | | +| 0082 | [删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0082.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0%20II.md) | 链表、双指针 | 中等 | | 0206 | [反转链表](https://leetcode.cn/problems/reverse-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0206.%20%E5%8F%8D%E8%BD%AC%E9%93%BE%E8%A1%A8.md) | 链表 | 简单 | | 0092 | 反转链表 II | | | | | 0025 | K 个一组翻转链表 | | | | diff --git a/Contents/00.Introduction/06.Interview-100-List.md b/Contents/00.Introduction/06.Interview-100-List.md index 701b11a0..fbd9f450 100644 --- a/Contents/00.Introduction/06.Interview-100-List.md +++ b/Contents/00.Introduction/06.Interview-100-List.md @@ -128,7 +128,7 @@ | 题号 | 标题 | 题解 | 标签 | 难度 | | :------ | :------ | :------ | :------ | :------ | | 0083 | [删除排序链表中的重复元素](https://leetcode.cn/problems/remove-duplicates-from-sorted-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0083.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0.md) | 链表 | 简单 | -| 0082 | 删除排序链表中的重复元素 II | | | | +| 0082 | [删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0082.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0%20II.md) | 链表、双指针 | 中等 | | 0206 | [反转链表](https://leetcode.cn/problems/reverse-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0206.%20%E5%8F%8D%E8%BD%AC%E9%93%BE%E8%A1%A8.md) | 链表 | 简单 | | 0092 | 反转链表 II | | | | | 0025 | K 个一组翻转链表 | | | | diff --git a/Contents/00.Introduction/07.Interview-200-List.md b/Contents/00.Introduction/07.Interview-200-List.md index 4954fed6..e386c914 100644 --- a/Contents/00.Introduction/07.Interview-200-List.md +++ b/Contents/00.Introduction/07.Interview-200-List.md @@ -134,7 +134,7 @@ | 0011 | [盛最多水的容器](https://leetcode.cn/problems/container-with-most-water/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0011.%20%E7%9B%9B%E6%9C%80%E5%A4%9A%E6%B0%B4%E7%9A%84%E5%AE%B9%E5%99%A8.md) | 贪心、数组、双指针 | 中等 | | 0075 | [颜色分类](https://leetcode.cn/problems/sort-colors/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0075.%20%E9%A2%9C%E8%89%B2%E5%88%86%E7%B1%BB.md) | 数组、排序、双指针 | 中等 | | 剑指 Offer 21 | [调整数组顺序使奇数位于偶数前面](https://leetcode.cn/problems/diao-zheng-shu-zu-shun-xu-shi-qi-shu-wei-yu-ou-shu-qian-mian-lcof/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/%E5%89%91%E6%8C%87%20Offer%2021.%20%E8%B0%83%E6%95%B4%E6%95%B0%E7%BB%84%E9%A1%BA%E5%BA%8F%E4%BD%BF%E5%A5%87%E6%95%B0%E4%BD%8D%E4%BA%8E%E5%81%B6%E6%95%B0%E5%89%8D%E9%9D%A2.md) | 数组、双指针、排序 | 简单 | -| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | | 简单 | +| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | 双指针、字符串 | 中等 | #### 快慢指针题目 @@ -176,7 +176,7 @@ | 题号 | 标题 | 题解 | 标签 | 难度 | | :------ | :------ | :------ | :------ | :------ | | 0083 | [删除排序链表中的重复元素](https://leetcode.cn/problems/remove-duplicates-from-sorted-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0083.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0.md) | 链表 | 简单 | -| 0082 | 删除排序链表中的重复元素 II | | | | +| 0082 | [删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0082.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0%20II.md) | 链表、双指针 | 中等 | | 0206 | [反转链表](https://leetcode.cn/problems/reverse-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0206.%20%E5%8F%8D%E8%BD%AC%E9%93%BE%E8%A1%A8.md) | 链表 | 简单 | | 0092 | 反转链表 II | | | | | 0025 | K 个一组翻转链表 | | | | diff --git a/Contents/01.Array/04.Array-Two-Pointers/02.Array-Two-Pointers-List.md b/Contents/01.Array/04.Array-Two-Pointers/02.Array-Two-Pointers-List.md index d90395d3..8ae25969 100644 --- a/Contents/01.Array/04.Array-Two-Pointers/02.Array-Two-Pointers-List.md +++ b/Contents/01.Array/04.Array-Two-Pointers/02.Array-Two-Pointers-List.md @@ -22,7 +22,7 @@ | 0881 | [救生艇](https://leetcode.cn/problems/boats-to-save-people/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0881.%20%E6%95%91%E7%94%9F%E8%89%87.md) | 贪心、数组、双指针、排序 | 中等 | | 0042 | [接雨水](https://leetcode.cn/problems/trapping-rain-water/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0042.%20%E6%8E%A5%E9%9B%A8%E6%B0%B4.md) | 栈、数组、双指针、动态规划、单调栈 | 困难 | | 剑指 Offer 21 | [调整数组顺序使奇数位于偶数前面](https://leetcode.cn/problems/diao-zheng-shu-zu-shun-xu-shi-qi-shu-wei-yu-ou-shu-qian-mian-lcof/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/%E5%89%91%E6%8C%87%20Offer%2021.%20%E8%B0%83%E6%95%B4%E6%95%B0%E7%BB%84%E9%A1%BA%E5%BA%8F%E4%BD%BF%E5%A5%87%E6%95%B0%E4%BD%8D%E4%BA%8E%E5%81%B6%E6%95%B0%E5%89%8D%E9%9D%A2.md) | 数组、双指针、排序 | 简单 | -| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | | 简单 | +| 0443 | [压缩字符串](https://leetcode.cn/problems/string-compression/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0443.%20%E5%8E%8B%E7%BC%A9%E5%AD%97%E7%AC%A6%E4%B8%B2.md) | 双指针、字符串 | 中等 | #### 快慢指针题目 diff --git a/Contents/02.Linked-List/01.Linked-List-Basic/02.Linked-List-Basic-List.md b/Contents/02.Linked-List/01.Linked-List-Basic/02.Linked-List-Basic-List.md index b4b39868..d24a2d38 100644 --- a/Contents/02.Linked-List/01.Linked-List-Basic/02.Linked-List-Basic-List.md +++ b/Contents/02.Linked-List/01.Linked-List-Basic/02.Linked-List-Basic-List.md @@ -4,7 +4,7 @@ | :------ | :------ | :------ | :------ | :------ | | 0707 | [设计链表](https://leetcode.cn/problems/design-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0707.%20%E8%AE%BE%E8%AE%A1%E9%93%BE%E8%A1%A8.md) | 链表 | 中等 | | 0083 | [删除排序链表中的重复元素](https://leetcode.cn/problems/remove-duplicates-from-sorted-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0083.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0.md) | 链表 | 简单 | -| 0082 | 删除排序链表中的重复元素 II | | | | +| 0082 | [删除排序链表中的重复元素 II](https://leetcode.cn/problems/remove-duplicates-from-sorted-list-ii/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0082.%20%E5%88%A0%E9%99%A4%E6%8E%92%E5%BA%8F%E9%93%BE%E8%A1%A8%E4%B8%AD%E7%9A%84%E9%87%8D%E5%A4%8D%E5%85%83%E7%B4%A0%20II.md) | 链表、双指针 | 中等 | | 0206 | [反转链表](https://leetcode.cn/problems/reverse-linked-list/) | [Python](https://github.com/itcharge/LeetCode-Py/blob/main/Solutions/0206.%20%E5%8F%8D%E8%BD%AC%E9%93%BE%E8%A1%A8.md) | 链表 | 简单 | | 0092 | 反转链表 II | | | | | 0025 | K 个一组翻转链表 | | | | diff --git a/README.md b/README.md index 6c101f20..f8d3be67 100644 --- a/README.md +++ b/README.md @@ -254,4 +254,4 @@ - [动态规划优化题目](./Contents/10.Dynamic-Programming/11.DP-Optimization/04.DP-Optimization-List.md) ## 11. 附加内容 -## [12. LeetCode 题解(已完成 711 道)](./Contents/00.Introduction/04.Solutions-List.md) \ No newline at end of file +## [12. LeetCode 题解(已完成 712 道)](./Contents/00.Introduction/04.Solutions-List.md) \ No newline at end of file

AltStyle によって変換されたページ (->オリジナル) /