Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 8a4905e

Browse files
feat: update lc problems (#4097)
1 parent c73dfce commit 8a4905e

File tree

50 files changed

+478
-126
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

+478
-126
lines changed

‎solution/0200-0299/0254.Factor Combinations/README.md‎

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ tags:
2020

2121
<p>例如:</p>
2222

23-
<pre>8 = 2 x 2 x 2;
23+
<pre>
24+
8 = 2 x 2 x 2;
2425
= 2 x 4.</pre>
2526

2627
<p>请实现一个函数,该函数接收一个整数 <em>n</em>&nbsp;并返回该整数所有的因子组合。</p>
@@ -34,18 +35,21 @@ tags:
3435

3536
<p><strong>示例 1:</strong></p>
3637

37-
<pre><strong>输入: </strong><code>1</code>
38+
<pre>
39+
<strong>输入: </strong><code>1</code>
3840
<strong>输出: </strong>[]
3941
</pre>
4042

4143
<p><strong>示例 2:</strong></p>
4244

43-
<pre><strong>输入: </strong><code>37</code>
45+
<pre>
46+
<strong>输入: </strong><code>37</code>
4447
<strong>输出: </strong>[]</pre>
4548

4649
<p><strong>示例 3:</strong></p>
4750

48-
<pre><strong>输入: </strong><code>12</code>
51+
<pre>
52+
<strong>输入: </strong><code>12</code>
4953
<strong>输出:</strong>
5054
[
5155
[2, 6],
@@ -55,7 +59,8 @@ tags:
5559

5660
<p><strong>示例 4: </strong></p>
5761

58-
<pre><strong>输入: </strong><code>32</code>
62+
<pre>
63+
<strong>输入: </strong><code>32</code>
5964
<strong>输出:</strong>
6065
[
6166
[2, 16],
@@ -67,6 +72,14 @@ tags:
6772
]
6873
</pre>
6974

75+
<p>&nbsp;</p>
76+
77+
<p><b>提示:</b></p>
78+
79+
<ul>
80+
<li><code>1 &lt;= n &lt;= 10<sup>7</sup></code></li>
81+
</ul>
82+
7083
<!-- description:end -->
7184

7285
## 解法

‎solution/0200-0299/0262.Trips and Users/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ banned is an ENUM (category) type of (&#39;Yes&#39;, &#39;No&#39;).
5555

5656
<p>The <strong>cancellation rate</strong> is computed by dividing the number of canceled (by client or driver) requests with unbanned users by the total number of requests with unbanned users on that day.</p>
5757

58-
<p>Write a solution to find the <strong>cancellation rate</strong> of requests with unbanned users (<strong>both client and driver must not be banned</strong>) each day between <code>&quot;2013年10月01日&quot;</code> and <code>&quot;2013年10月03日&quot;</code>. Round <code>Cancellation Rate</code> to <strong>two decimal</strong> points.</p>
58+
<p>Write a solution to find the <strong>cancellation rate</strong> of requests with unbanned users (<strong>both client and driver must not be banned</strong>) each day between <code>&quot;2013年10月01日&quot;</code> and <code>&quot;2013年10月03日&quot;</code> with <strong>at least</strong> one trip. Round <code>Cancellation Rate</code> to <strong>two decimal</strong> points.</p>
5959

6060
<p>Return the result table in <strong>any order</strong>.</p>
6161

‎solution/0700-0799/0720.Longest Word in Dictionary/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ tags:
4141
<pre>
4242
<strong>输入:</strong>words = ["a", "banana", "app", "appl", "ap", "apply", "apple"]
4343
<strong>输出:</strong>"apple"
44-
<strong>解释:</strong>"apply" 和 "apple" 都能由词典中的单词组成。但是 "apple" 的字典序小于 "apply"
44+
<strong>解释:</strong>"apply" 和 "apple" 都能由词典中的单词组成。但是 "apple" 的字典序小于 "apply"
4545
</pre>
4646

4747
<p>&nbsp;</p>

‎solution/0700-0799/0722.Remove Comments/README.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,20 @@ tags:
5959
<strong>解释:</strong> 示例代码可以编排成这样:
6060
/*Test program */
6161
int main()
62-
{
63-
// variable declaration
62+
{
63+
// variable declaration
6464
int a, b, c;
6565
/* This is a test
66-
multiline
67-
comment for
66+
multiline
67+
comment for
6868
testing */
6969
a = b + c;
7070
}
7171
第 1 行和第 6-9 行的字符串 /* 表示块注释。第 4 行的字符串 // 表示行注释。
72-
编排后:
72+
编排后:
7373
int main()
74-
{
75-
74+
{
75+
7676
int a, b, c;
7777
a = b + c;
7878
}</pre>

‎solution/0700-0799/0722.Remove Comments/README_EN.md‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,20 @@ tags:
5858
<strong>Explanation:</strong> The line by line code is visualized as below:
5959
/*Test program */
6060
int main()
61-
{
62-
// variable declaration
61+
{
62+
// variable declaration
6363
int a, b, c;
6464
/* This is a test
65-
multiline
66-
comment for
65+
multiline
66+
comment for
6767
testing */
6868
a = b + c;
6969
}
7070
The string /* denotes a block comment, including line 1 and lines 6-9. The string // denotes line 4 as comments.
7171
The line by line output code is visualized as below:
7272
int main()
73-
{
74-
73+
{
74+
7575
int a, b, c;
7676
a = b + c;
7777
}

‎solution/0700-0799/0727.Minimum Window Subsequence/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tags:
2828
<pre>
2929
<strong>Input:</strong> s1 = &quot;abcdebdde&quot;, s2 = &quot;bde&quot;
3030
<strong>Output:</strong> &quot;bcde&quot;
31-
<strong>Explanation:</strong>
31+
<strong>Explanation:</strong>
3232
&quot;bcde&quot; is the answer because it occurs before &quot;bdde&quot; which has the same length.
3333
&quot;deb&quot; is not a smaller window because the elements of s2 in the window must occur in order.
3434
</pre>

‎solution/0700-0799/0763.Partition Labels/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tags:
1919

2020
<!-- description:start -->
2121

22-
<p>给你一个字符串 <code>s</code> 。我们要把这个字符串划分为尽可能多的片段,同一字母最多出现在一个片段中。</p>
22+
<p>给你一个字符串 <code>s</code> 。我们要把这个字符串划分为尽可能多的片段,同一字母最多出现在一个片段中。例如,字符串&nbsp;<code>"ababcc"</code> 能够被分为 <code>["abab", "cc"]</code>,但类似&nbsp;<code>["aba", "bcc"]</code> 或&nbsp;<code>["ab", "ab", "cc"]</code> 的划分是非法的。</p>
2323

2424
<p>注意,划分结果需要满足:将所有划分结果按顺序连接,得到的字符串仍然是 <code>s</code> 。</p>
2525

‎solution/0800-0899/0801.Minimum Swaps To Make Sequences Increasing/README_EN.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ tags:
3333
<pre>
3434
<strong>Input:</strong> nums1 = [1,3,5,4], nums2 = [1,2,3,7]
3535
<strong>Output:</strong> 1
36-
<strong>Explanation:</strong>
36+
<strong>Explanation:</strong>
3737
Swap nums1[3] and nums2[3]. Then the sequences are:
3838
nums1 = [1, 3, 5, 7] and nums2 = [1, 2, 3, 4]
3939
which are both strictly increasing.

‎solution/0800-0899/0850.Rectangle Area II/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tags:
1919

2020
<!-- description:start -->
2121

22-
<p>给你一个轴对齐的二维数组&nbsp;<code>rectangles</code>&nbsp;。 对于&nbsp;<code>rectangle[i] = [x1, y1, x2, y2]</code>,其中(x1,y1)是矩形&nbsp;<code>i</code>&nbsp;左下角的坐标,<metacharset="UTF-8" />&nbsp;<code>(x<sub>i1</sub>, y<sub>i1</sub>)</code>&nbsp;是该矩形 <strong>左下角</strong> 的坐标,<meta charset="UTF-8" />&nbsp;<code>(x<sub>i2</sub>, y<sub>i2</sub>)</code>&nbsp;是该矩形&nbsp;<strong>右上角</strong> 的坐标。</p>
22+
<p>给你一个轴对齐的二维数组&nbsp;<code>rectangles</code>&nbsp;。 对于&nbsp;<code>rectangle[i] = [x1, y1, x2, y2]</code>,其中&nbsp;<code>(x<sub>i1</sub>, y<sub>i1</sub>)</code>&nbsp;是该矩形 <strong>左下角</strong> 的坐标,<meta charset="UTF-8" />&nbsp;<code>(x<sub>i2</sub>, y<sub>i2</sub>)</code>&nbsp;是该矩形&nbsp;<strong>右上角</strong> 的坐标。</p>
2323

2424
<p>计算平面中所有&nbsp;<code>rectangles</code>&nbsp;所覆盖的 <strong>总面积 </strong>。任何被两个或多个矩形覆盖的区域应只计算 <strong>一次</strong> 。</p>
2525

‎solution/1400-1499/1408.String Matching in an Array/README.md‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,11 @@ tags:
2020

2121
<!-- description:start -->
2222

23-
<p>给你一个字符串数组 <code>words</code> ,数组中的每个字符串都可以看作是一个单词。请你按 <strong>任意</strong> 顺序返回 <code>words</code> 中是其他单词的子字符串的所有单词。</p>
24-
25-
<p>如果你可以删除 <code>words[j]</code>&nbsp;最左侧和/或最右侧的若干字符得到 <code>words[i]</code> ,那么字符串 <code>words[i]</code> 就是 <code>words[j]</code> 的一个子字符串。</p>
23+
<p>给你一个字符串数组 <code>words</code> ,数组中的每个字符串都可以看作是一个单词。请你按 <strong>任意</strong> 顺序返回 <code>words</code> 中是其他单词的 <span data-keyword="substring-nonempty">子字符串</span> 的所有单词。</p>
2624

2725
<p>&nbsp;</p>
2826

29-
<p><strong>示例 1:</strong></p>
27+
<p><strongclass="example">示例 1:</strong></p>
3028

3129
<pre>
3230
<strong>输入:</strong>words = ["mass","as","hero","superhero"]
@@ -35,15 +33,15 @@ tags:
3533
["hero","as"] 也是有效的答案。
3634
</pre>
3735

38-
<p><strong>示例 2:</strong></p>
36+
<p><strongclass="example">示例 2:</strong></p>
3937

4038
<pre>
4139
<strong>输入:</strong>words = ["leetcode","et","code"]
4240
<strong>输出:</strong>["et","code"]
4341
<strong>解释:</strong>"et" 和 "code" 都是 "leetcode" 的子字符串。
4442
</pre>
4543

46-
<p><strong>示例 3:</strong></p>
44+
<p><strongclass="example">示例 3:</strong></p>
4745

4846
<pre>
4947
<strong>输入:</strong>words = ["blue","green","bu"]
@@ -58,7 +56,7 @@ tags:
5856
<li><code>1 &lt;= words.length &lt;= 100</code></li>
5957
<li><code>1 &lt;= words[i].length &lt;= 30</code></li>
6058
<li><code>words[i]</code> 仅包含小写英文字母。</li>
61-
<li>题目数据 <strong>保证</strong> 每个 <code>words[i]</code> 都是独一无二的。</li>
59+
<li>题目数据 <strong>保证</strong> <code>words</code>&nbsp;的每个字符串都是独一无二的。</li>
6260
</ul>
6361

6462
<!-- description:end -->

0 commit comments

Comments
(0)

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