Skip to content

Commit ea99dcf

Browse files
authored
feat: add solutions to lc problems: No.3687~3689 (#4738)
1 parent a90d058 commit ea99dcf

File tree

50 files changed

+1646
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1646
-8
lines changed

solution/0300-0399/0358.Rearrange String k Distance Apart/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ tags:
2929

3030
<pre>
3131
<strong>输入: </strong>s = "aabbcc", k = 3
32-
<strong>输出: </strong>"abcabc"
32+
<strong>输出: </strong>"abcabc"
3333
<strong>解释: </strong>相同的字母在新的字符串中间隔至少 3 个单位距离。
3434
</pre>
3535

3636
<p><strong>示例 2:</strong></p>
3737

3838
<pre>
3939
<strong>输入: </strong>s = "aaabc", k = 3
40-
<strong>输出: </strong>""
40+
<strong>输出: </strong>""
4141
<strong>解释:</strong> 没有办法找到可能的重排结果。
4242
</pre>
4343

solution/2100-2199/2197.Replace Non-Coprime Numbers in Array/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ tags:
6262
- (3, 3) 是一组非互质数,且 LCM(3, 3) = 3 。得到 nums = [2,2,1,1,<em><strong>3</strong></em>,3] 。
6363
- (3, 3) 是一组非互质数,且 LCM(3, 3) = 3 。得到 nums = [2,2,1,1,<em><strong>3</strong></em>] 。
6464
- (2, 2) 是一组非互质数,且 LCM(2, 2) = 2 。得到 nums = [<em><strong>2</strong></em>,1,1,3] 。
65-
现在,nums 中不存在相邻的非互质数。
66-
因此,修改后得到的最终数组是 [2,1,1,3] 。
65+
现在,nums 中不存在相邻的非互质数。
66+
因此,修改后得到的最终数组是 [2,1,1,3] 。
6767
注意,存在其他方法可以获得相同的最终数组。
6868
</pre>
6969

solution/2100-2199/2197.Replace Non-Coprime Numbers in Array/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ tags:
4242
<pre>
4343
<strong>Input:</strong> nums = [6,4,3,2,7,6,2]
4444
<strong>Output:</strong> [12,7,6]
45-
<strong>Explanation:</strong>
45+
<strong>Explanation:</strong>
4646
- (6, 4) are non-coprime with LCM(6, 4) = 12. Now, nums = [<strong><u>12</u></strong>,3,2,7,6,2].
4747
- (12, 3) are non-coprime with LCM(12, 3) = 12. Now, nums = [<strong><u>12</u></strong>,2,7,6,2].
4848
- (12, 2) are non-coprime with LCM(12, 2) = 12. Now, nums = [<strong><u>12</u></strong>,7,6,2].
@@ -57,7 +57,7 @@ Note that there are other ways to obtain the same resultant array.
5757
<pre>
5858
<strong>Input:</strong> nums = [2,2,1,1,3,3,3]
5959
<strong>Output:</strong> [2,1,1,3]
60-
<strong>Explanation:</strong>
60+
<strong>Explanation:</strong>
6161
- (3, 3) are non-coprime with LCM(3, 3) = 3. Now, nums = [2,2,1,1,<u><strong>3</strong></u>,3].
6262
- (3, 3) are non-coprime with LCM(3, 3) = 3. Now, nums = [2,2,1,1,<u><strong>3</strong></u>].
6363
- (2, 2) are non-coprime with LCM(2, 2) = 2. Now, nums = [<u><strong>2</strong></u>,1,1,3].

solution/3600-3699/3678.Smallest Absent Positive Greater Than Average/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 简单
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3678.Smallest%20Absent%20Positive%20Greater%20Than%20Average/README.md
5+
rating: 1306
6+
source: 第 165 场双周赛 Q1
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3678.Smallest Absent Positive Greater Than Average/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Easy
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3678.Smallest%20Absent%20Positive%20Greater%20Than%20Average/README_EN.md
5+
rating: 1306
6+
source: Biweekly Contest 165 Q1
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3679.Minimum Discards to Balance Inventory/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3679.Minimum%20Discards%20to%20Balance%20Inventory/README.md
5+
rating: 1638
6+
source: 第 165 场双周赛 Q2
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3679.Minimum Discards to Balance Inventory/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3679.Minimum%20Discards%20to%20Balance%20Inventory/README_EN.md
5+
rating: 1638
6+
source: Biweekly Contest 165 Q2
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3680.Generate Schedule/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3680.Generate%20Schedule/README.md
5+
rating: 2377
6+
source: 第 165 场双周赛 Q3
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3680.Generate Schedule/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3680.Generate%20Schedule/README_EN.md
5+
rating: 2377
6+
source: Biweekly Contest 165 Q3
57
---
68

79
<!-- problem:start -->

solution/3600-3699/3681.Maximum XOR of Subsequences/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 困难
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3600-3699/3681.Maximum%20XOR%20of%20Subsequences/README.md
5+
rating: 2026
6+
source: 第 165 场双周赛 Q4
57
---
68

79
<!-- problem:start -->

0 commit comments

Comments
 (0)