Skip to content

Commit a94b7fe

Browse files
authored
feat: update lc problems (doocs#4766)
1 parent 7a5af2f commit a94b7fe

File tree

139 files changed

+1194
-953
lines changed

Some content is hidden

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

139 files changed

+1194
-953
lines changed

solution/0000-0099/0003.Longest Substring Without Repeating Characters/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tags:
2626
<pre>
2727
<strong>Input:</strong> s = &quot;abcabcbb&quot;
2828
<strong>Output:</strong> 3
29-
<strong>Explanation:</strong> The answer is &quot;abc&quot;, with the length of 3.
29+
<strong>Explanation:</strong> The answer is &quot;abc&quot;, with the length of 3. Note that <code>&quot;bca&quot;</code> and <code>&quot;cab&quot;</code> are also correct answers.
3030
</pre>
3131

3232
<p><strong class="example">Example 2:</strong></p>

solution/0000-0099/0039.Combination Sum/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ tags:
2828
<p><strong>示例&nbsp;1:</strong></p>
2929

3030
<pre>
31-
<strong>输入:</strong>candidates = <code>[2,3,6,7]</code>, target = <code>7</code>
31+
<strong>输入:</strong>candidates = [2,3,6,7], target = 7
3232
<strong>输出:</strong>[[2,2,3],[7]]
3333
<strong>解释:</strong>
3434
2 和 3 可以形成一组候选,2 + 2 + 3 = 7 。注意 2 可以使用多次。
@@ -38,13 +38,13 @@ tags:
3838
<p><strong>示例&nbsp;2:</strong></p>
3939

4040
<pre>
41-
<strong>输入: </strong>candidates = [2,3,5]<code>, </code>target = 8
41+
<strong>输入: </strong>candidates = [2,3,5], target = 8
4242
<strong>输出: </strong>[[2,2,2,2],[2,3,3],[3,5]]</pre>
4343

4444
<p><strong>示例 3:</strong></p>
4545

4646
<pre>
47-
<strong>输入: </strong>candidates = <code>[2], </code>target = 1
47+
<strong>输入: </strong>candidates = [2], target = 1
4848
<strong>输出: </strong>[]
4949
</pre>
5050

solution/0100-0199/0122.Best Time to Buy and Sell Stock II/README.md

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

2121
<p>给你一个整数数组 <code>prices</code> ,其中&nbsp;<code>prices[i]</code> 表示某支股票第 <code>i</code> 天的价格。</p>
2222

23-
<p>在每一天,你可以决定是否购买和/或出售股票。你在任何时候&nbsp;<strong>最多</strong>&nbsp;只能持有 <strong>一股</strong> 股票。你也可以先购买,然后在 <strong>同一天</strong> 出售。</p>
23+
<p>在每一天,你可以决定是否购买和/或出售股票。你在任何时候&nbsp;<strong>最多</strong>&nbsp;只能持有 <strong>一股</strong> 股票。然而,你可以在 <strong>同一天</strong> 多次买卖该股票,但要确保你持有的股票不超过一股。</p>
2424

2525
<p>返回 <em>你能获得的 <strong>最大</strong> 利润</em>&nbsp;。</p>
2626

solution/0100-0199/0122.Best Time to Buy and Sell Stock II/README_EN.md

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

2121
<p>You are given an integer array <code>prices</code> where <code>prices[i]</code> is the price of a given stock on the <code>i<sup>th</sup></code> day.</p>
2222

23-
<p>On each day, you may decide to buy and/or sell the stock. You can only hold <strong>at most one</strong> share of the stock at any time. However, you can buy it then immediately sell it on the <strong>same day</strong>.</p>
23+
<p>On each day, you may decide to buy and/or sell the stock. You can only hold <strong>at most one</strong> share of the stock at any time. However, you can sell and buy the stock multiple times on the <strong>same day</strong>, ensuring you never hold than one share of the stock.</p>
2424

2525
<p>Find and return <em>the <strong>maximum</strong> profit you can achieve</em>.</p>
2626

solution/0100-0199/0166.Fraction to Recurring Decimal/README_EN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ tags:
2020

2121
<p>Given two integers representing the <code>numerator</code> and <code>denominator</code> of a fraction, return <em>the fraction in string format</em>.</p>
2222

23-
<p>If the fractional part is repeating, enclose the repeating part in parentheses.</p>
23+
<p>If the fractional part is repeating, enclose the repeating part in parentheses</p>
2424

2525
<p>If multiple answers are possible, return <strong>any of them</strong>.</p>
2626

2727
<p>It is <strong>guaranteed</strong> that the length of the answer string is less than <code>10<sup>4</sup></code> for all the given inputs.</p>
2828

29+
<p><strong>Note</strong> that if the fraction can be represented as a <em>finite length string</em>, you <strong>must</strong> return it.</p>
30+
2931
<p>&nbsp;</p>
3032
<p><strong class="example">Example 1:</strong></p>
3133

solution/0100-0199/0190.Reverse Bits/README.md

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

1818
<!-- description:start -->
1919

20-
<p>颠倒给定的 32 位无符号整数的二进制位。</p>
20+
<p>颠倒给定的 32 位有符号整数的二进制位。</p>
2121

2222
<p>&nbsp;</p>
2323

solution/0200-0299/0290.Word Pattern/README.md

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

2020
<p>给定一种规律 <code>pattern</code>&nbsp;和一个字符串&nbsp;<code>s</code>&nbsp;,判断 <code>s</code>&nbsp;是否遵循相同的规律。</p>
2121

22-
<p>这里的&nbsp;<strong>遵循&nbsp;</strong>指完全匹配,例如,&nbsp;<code>pattern</code>&nbsp;里的每个字母和字符串&nbsp;<code>s</code><strong>&nbsp;</strong>中的每个非空单词之间存在着双向连接的对应规律。</p>
22+
<p>这里的&nbsp;<strong>遵循&nbsp;</strong>指完全匹配,例如,&nbsp;<code>pattern</code>&nbsp;里的每个字母和字符串&nbsp;<code>s</code><strong>&nbsp;</strong>中的每个非空单词之间存在着双向连接的对应规律。具体来说:</p>
23+
24+
<ul>
25+
<li><code>pattern</code>&nbsp;中的每个字母都 <strong>恰好</strong> 映射到 <code>s</code> 中的一个唯一单词。</li>
26+
<li><code>s</code> 中的每个唯一单词都 <strong>恰好</strong> 映射到&nbsp;<code>pattern</code> 中的一个字母。</li>
27+
<li>没有两个字母映射到同一个单词,也没有两个单词映射到同一个字母。</li>
28+
</ul>
2329

2430
<p>&nbsp;</p>
2531

0 commit comments

Comments
 (0)