Skip to content

Commit 03fcdff

Browse files
authored
Merge branch 'doocs:main' into main
2 parents 015cd3d + b63f203 commit 03fcdff

File tree

69 files changed

+1310
-721
lines changed

Some content is hidden

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

69 files changed

+1310
-721
lines changed

.github/workflows/deploy.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ jobs:
5959
github_token: ${{ secrets.GITHUB_TOKEN }}
6060
publish_dir: ./site
6161

62-
sync:
63-
runs-on: ubuntu-latest
64-
needs: deploy
65-
if: github.repository == 'doocs/leetcode'
66-
steps:
67-
- name: Sync to gitee.com
68-
uses: wearerequired/git-mirror-action@master
69-
env:
70-
SSH_PRIVATE_KEY: ${{ secrets.RSA_PRIVATE_KEY }}
71-
with:
72-
source-repo: [email protected]:doocs/leetcode.git
73-
destination-repo: [email protected]:Doocs/leetcode.git
62+
# sync:
63+
# runs-on: ubuntu-latest
64+
# needs: deploy
65+
# if: github.repository == 'doocs/leetcode'
66+
# steps:
67+
# - name: Sync to gitee.com
68+
# uses: wearerequired/git-mirror-action@master
69+
# env:
70+
# SSH_PRIVATE_KEY: ${{ secrets.RSA_PRIVATE_KEY }}
71+
# with:
72+
# source-repo: [email protected]:doocs/leetcode.git
73+
# destination-repo: [email protected]:Doocs/leetcode.git
7474

75-
- name: Build Gitee Pages
76-
uses: yanglbme/gitee-pages-action@main
77-
with:
78-
gitee-username: yanglbme
79-
gitee-password: ${{ secrets.GITEE_PASSWORD }}
80-
gitee-repo: doocs/leetcode
81-
branch: gh-pages
75+
# - name: Build Gitee Pages
76+
# uses: yanglbme/gitee-pages-action@main
77+
# with:
78+
# gitee-username: yanglbme
79+
# gitee-password: ${{ secrets.GITEE_PASSWORD }}
80+
# gitee-repo: doocs/leetcode
81+
# branch: gh-pages

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020

2121
## 站点
2222

23-
- GitHub Pages: https://doocs.github.io/leetcode
24-
- Gitee Pages: https://doocs.gitee.io/leetcode
23+
https://doocs.github.io/leetcode
2524

2625
## 算法全解
2726

README_EN.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ This project contains solutions for problems from LeetCode, "Coding Interviews (
2020

2121
## Sites
2222

23-
- GitHub Pages: https://doocs.github.io/leetcode
24-
- Gitee Pages: https://doocs.gitee.io/leetcode
23+
https://doocs.github.io/leetcode
2524

2625
## Solutions
2726

solution/0000-0099/0057.Insert Interval/README.md

Lines changed: 14 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,17 @@
88

99
<!-- 这里写题目描述 -->
1010

11-
<p>给你一个<strong> 无重叠的</strong><em> ,</em>按照区间起始端点排序的区间列表。</p>
11+
<p>给你一个<strong> 无重叠的</strong><em> ,</em>按照区间起始端点排序的区间列表 <code>intervals</code>,其中&nbsp;<code>intervals[i] = [start<sub>i</sub>, end<sub>i</sub>]</code>&nbsp;表示第&nbsp;<code>i</code>&nbsp;个区间的开始和结束,并且&nbsp;<code>intervals</code>&nbsp;按照&nbsp;<code>start<sub>i</sub></code>&nbsp;升序排列。同样给定一个区间&nbsp;<code>newInterval = [start, end]</code>&nbsp;表示另一个区间的开始和结束。</p>
1212

13-
<p>在列表中插入一个新的区间,你需要确保列表中的区间仍然有序且不重叠(如果有必要的话,可以合并区间)。</p>
13+
<p>&nbsp;<code>intervals</code> 中插入区间&nbsp;<code>newInterval</code>,使得&nbsp;<code>intervals</code>&nbsp;依然按照&nbsp;<code>start<sub>i</sub></code>&nbsp;升序排列,且区间之间不重叠(如果有必要的话,可以合并区间)。</p>
1414

15-
<p> </p>
15+
<p>返回插入之后的&nbsp;<code>intervals</code>。</p>
1616

17-
<p><strong>示例 1:</strong></p>
17+
<p><strong>注意</strong> 你不需要原地修改&nbsp;<code>intervals</code>。你可以创建一个新数组然后返回它。</p>
18+
19+
<p>&nbsp;</p>
20+
21+
<p><strong>示例&nbsp;1:</strong></p>
1822

1923
<pre>
2024
<strong>输入:</strong>intervals = [[1,3],[6,9]], newInterval = [2,5]
@@ -26,40 +30,20 @@
2630
<pre>
2731
<strong>输入:</strong>intervals = [[1,2],[3,5],[6,7],[8,10],[12,16]], newInterval = [4,8]
2832
<strong>输出:</strong>[[1,2],[3,10],[12,16]]
29-
<strong>解释:</strong>这是因为新的区间 <code>[4,8]</code> 与 <code>[3,5],[6,7],[8,10]</code> 重叠。</pre>
30-
31-
<p><strong>示例 3:</strong></p>
32-
33-
<pre>
34-
<strong>输入:</strong>intervals = [], newInterval = [5,7]
35-
<strong>输出:</strong>[[5,7]]
36-
</pre>
37-
38-
<p><strong>示例 4:</strong></p>
39-
40-
<pre>
41-
<strong>输入:</strong>intervals = [[1,5]], newInterval = [2,3]
42-
<strong>输出:</strong>[[1,5]]
43-
</pre>
44-
45-
<p><strong>示例 5:</strong></p>
46-
47-
<pre>
48-
<strong>输入:</strong>intervals = [[1,5]], newInterval = [2,7]
49-
<strong>输出:</strong>[[1,7]]
33+
<strong>解释:</strong>这是因为新的区间 <code>[4,8]</code> 与 <code>[3,5],[6,7],[8,10]</code>&nbsp;重叠。
5034
</pre>
5135

52-
<p> </p>
36+
<p>&nbsp;</p>
5337

5438
<p><strong>提示:</strong></p>
5539

5640
<ul>
57-
<li><code>0 <= intervals.length <= 10<sup>4</sup></code></li>
41+
<li><code>0 &lt;= intervals.length &lt;= 10<sup>4</sup></code></li>
5842
<li><code>intervals[i].length == 2</code></li>
59-
<li><code>0 <= intervals[i][0] <= intervals[i][1] <= 10<sup>5</sup></code></li>
60-
<li><code>intervals</code> 根据 <code>intervals[i][0]</code> 按 <strong>升序</strong> 排列</li>
43+
<li><code>0 &lt;=&nbsp;start<sub>i</sub> &lt;=&nbsp;end<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
44+
<li><code>intervals</code> 根据 <code>start<sub>i</sub></code> 按 <strong>升序</strong> 排列</li>
6145
<li><code>newInterval.length == 2</code></li>
62-
<li><code>0 <= newInterval[0] <= newInterval[1] <= 10<sup>5</sup></code></li>
46+
<li><code>0 &lt;=&nbsp;start &lt;=&nbsp;end &lt;= 10<sup>5</sup></code></li>
6347
</ul>
6448

6549
## 解法

solution/0000-0099/0057.Insert Interval/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
<p>Return <code>intervals</code><em> after the insertion</em>.</p>
1414

15+
<p><strong>Note</strong> that you don&#39;t need to modify <code>intervals</code> in-place. You can make a new array and return it.</p>
16+
1517
<p>&nbsp;</p>
1618
<p><strong class="example">Example 1:</strong></p>
1719

solution/0000-0099/0090.Subsets II/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- 这里写题目描述 -->
1010

11-
<p>给你一个整数数组 <code>nums</code> ,其中可能包含重复元素,请你返回该数组所有可能的&lt;span data-keyword="subset"&gt;子集&lt;/span&gt;(幂集)。</p>
11+
<p>给你一个整数数组 <code>nums</code> ,其中可能包含重复元素,请你返回该数组所有可能的 <span data-keyword="subset">子集</span>(幂集)。</p>
1212

1313
<p>解集 <strong>不能</strong> 包含重复的子集。返回的解集中,子集可以按 <strong>任意顺序</strong> 排列。</p>
1414

solution/0300-0399/0310.Minimum Height Trees/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<!-- 这里写题目描述 -->
1010

11-
<p>树是一个无向图,其中任何两个顶点只通过一条路径连接。 换句话说,一个任何没有简单环路的连通图都是一棵树。</p>
11+
<p>树是一个无向图,其中任何两个顶点只通过一条路径连接。 换句话说,任何一个没有简单环路的连通图都是一棵树。</p>
1212

1313
<p>给你一棵包含&nbsp;<code>n</code>&nbsp;个节点的树,标记为&nbsp;<code>0</code>&nbsp;&nbsp;<code>n - 1</code> 。给定数字&nbsp;<code>n</code>&nbsp;和一个有 <code>n - 1</code> 条无向边的 <code>edges</code>&nbsp;列表(每一个边都是一对标签),其中 <code>edges[i] = [a<sub>i</sub>, b<sub>i</sub>]</code> 表示树中节点 <code>a<sub>i</sub></code> 和 <code>b<sub>i</sub></code> 之间存在一条无向边。</p>
1414

solution/0700-0799/0791.Custom Sort String/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<p>Return <em>any permutation of </em><code>s</code><em> that satisfies this property</em>.</p>
1414

1515
<p>&nbsp;</p>
16-
<p><strong class="example">Example 1: </strong></p>
16+
<p><strong class="example">Example 1:</strong></p>
1717

1818
<div class="example-block" style="border-color: var(--border-tertiary); border-left-width: 2px; color: var(--text-secondary); font-size: .875rem; margin-bottom: 1rem; margin-top: 1rem; overflow: visible; padding-left: 1rem;">
1919
<p><strong>Input: </strong> <span class="example-io" style="font-family: Menlo,sans-serif; font-size: 0.85rem;"> order = &quot;cba&quot;, s = &quot;abcd&quot; </span></p>
@@ -25,7 +25,7 @@
2525
<p>Since <code>&quot;d&quot;</code> does not appear in <code>order</code>, it can be at any position in the returned string. <code>&quot;dcba&quot;</code>, <code>&quot;cdba&quot;</code>, <code>&quot;cbda&quot;</code> are also valid outputs.</p>
2626
</div>
2727

28-
<p><strong class="example">Example 2: </strong></p>
28+
<p><strong class="example">Example 2:</strong></p>
2929

3030
<div class="example-block" style="border-color: var(--border-tertiary); border-left-width: 2px; color: var(--text-secondary); font-size: .875rem; margin-bottom: 1rem; margin-top: 1rem; overflow: visible; padding-left: 1rem;">
3131
<p><strong>Input: </strong> <span class="example-io" style="font-family: Menlo,sans-serif; font-size: 0.85rem;"> order = &quot;bcafg&quot;, s = &quot;abcd&quot; </span></p>

solution/1000-1099/1018.Binary Prefix Divisible By 5/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English Version](/solution/1000-1099/1018.Binary%20Prefix%20Divisible%20By%205/README_EN.md)
44

5-
<!-- tags:数组 -->
5+
<!-- tags:位运算,数组 -->
66

77
## 题目描述
88

solution/1000-1099/1018.Binary Prefix Divisible By 5/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[中文文档](/solution/1000-1099/1018.Binary%20Prefix%20Divisible%20By%205/README.md)
44

5-
<!-- tags:Array -->
5+
<!-- tags:Bit Manipulation,Array -->
66

77
## Description
88

0 commit comments

Comments
 (0)