Skip to content

Commit 6c6cb55

Browse files
authored
feat: update lc problems (#4255)
1 parent 4d8038c commit 6c6cb55

File tree

45 files changed

+14395
-14297
lines changed

Some content is hidden

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

45 files changed

+14395
-14297
lines changed

solution/0100-0199/0131.Palindrome Partitioning/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tags:
1818

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

21-
<p>给你一个字符串 <code>s</code>,请你将<em> </em><code>s</code><em> </em>分割成一些子串,使每个子串都是 <strong><span data-keyword="palindrome-string">回文串</span></strong> 。返回 <code>s</code> 所有可能的分割方案。</p>
21+
<p>给你一个字符串 <code>s</code>,请你将<em> </em><code>s</code><em> </em>分割成一些 <span data-keyword="substring-nonempty">子串</span>,使每个子串都是 <strong><span data-keyword="palindrome-string">回文串</span></strong> 。返回 <code>s</code> 所有可能的分割方案。</p>
2222

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

solution/0500-0599/0525.Contiguous Array/README.md

+18-11
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,35 @@ tags:
2020

2121
<p>给定一个二进制数组 <code>nums</code> , 找到含有相同数量的 <code>0</code> 和 <code>1</code> 的最长连续子数组,并返回该子数组的长度。</p>
2222

23-
<p> </p>
23+
<p>&nbsp;</p>
2424

25-
<p><strong>示例 1:</strong></p>
25+
<p><strong>示例 1</strong></p>
2626

2727
<pre>
28-
<strong>输入:</strong> nums = [0,1]
29-
<strong>输出:</strong> 2
30-
<strong>说明:</strong> [0, 1] 是具有相同数量 0 和 1 的最长连续子数组。</pre>
28+
<strong>输入</strong>nums = [0,1]
29+
<strong>输出</strong>2
30+
<strong>说明</strong>[0, 1] 是具有相同数量 0 和 1 的最长连续子数组。</pre>
3131

32-
<p><strong>示例 2:</strong></p>
32+
<p><strong>示例 2</strong></p>
3333

3434
<pre>
35-
<strong>输入:</strong> nums = [0,1,0]
36-
<strong>输出:</strong> 2
37-
<strong>说明:</strong> [0, 1] (或 [1, 0]) 是具有相同数量0和1的最长连续子数组。</pre>
35+
<strong>输入</strong>nums = [0,1,0]
36+
<strong>输出</strong>2
37+
<strong>说明</strong>[0, 1] (或 [1, 0]) 是具有相同数量 0 和 1 的最长连续子数组。</pre>
3838

39-
<p> </p>
39+
<p><strong>示例 3:</strong></p>
40+
41+
<pre>
42+
<b>输入:</b>nums = [0,1,1,1,1,1,0,0,0]
43+
<b>输出:</b>6
44+
<b>解释:</b>[1,1,1,0,0,0] 是具有相同数量 0 和 1 的最长连续子数组。</pre>
45+
46+
<p>&nbsp;</p>
4047

4148
<p><strong>提示:</strong></p>
4249

4350
<ul>
44-
<li><code>1 <= nums.length <= 10<sup>5</sup></code></li>
51+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
4552
<li><code>nums[i]</code> 不是 <code>0</code> 就是 <code>1</code></li>
4653
</ul>
4754

solution/0500-0599/0525.Contiguous Array/README_EN.md

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ tags:
3737
<strong>Explanation:</strong> [0, 1] (or [1, 0]) is a longest contiguous subarray with equal number of 0 and 1.
3838
</pre>
3939

40+
<p><strong class="example">Example 3:</strong></p>
41+
42+
<pre>
43+
<strong>Input:</strong> nums = [0,1,1,1,1,1,0,0,0]
44+
<strong>Output:</strong> 6
45+
<strong>Explanation:</strong> [1,1,1,0,0,0] is the longest contiguous subarray with equal number of 0 and 1.
46+
</pre>
47+
4048
<p>&nbsp;</p>
4149
<p><strong>Constraints:</strong></p>
4250

solution/1400-1499/1434.Number of Ways to Wear Different Hats to Each Other/README.md

-7
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,6 @@ tags:
5757
(1,2,3,4) 4 个帽子的排列方案数为 24 。
5858
</pre>
5959

60-
<p><strong>示例 4:</strong></p>
61-
62-
<pre>
63-
<strong>输入:</strong>hats = [[1,2,3],[2,3,5,6],[1,3,7,9],[1,8,9],[2,5,7]]
64-
<strong>输出:</strong>111
65-
</pre>
66-
6760
<p>&nbsp;</p>
6861

6962
<p><strong>提示:</strong></p>

solution/1400-1499/1434.Number of Ways to Wear Different Hats to Each Other/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tags:
2525

2626
<p>Given a 2D integer array <code>hats</code>, where <code>hats[i]</code> is a list of all hats preferred by the <code>i<sup>th</sup></code> person.</p>
2727

28-
<p>Return <em>the number of ways that the <code>n</code> people wear different hats to each other</em>.</p>
28+
<p>Return the number of ways that <code>n</code> people can wear <strong>different</strong> hats from each other.</p>
2929

3030
<p>Since the answer may be too large, return it modulo <code>10<sup>9</sup> + 7</code>.</p>
3131

solution/1400-1499/1471.The k Strongest Values in an Array/README.md

+10-18
Original file line numberDiff line numberDiff line change
@@ -35,52 +35,44 @@ tags:
3535

3636
<ul>
3737
<li>例如 <code>arr =&nbsp;[6, -3, 7, 2, 11]</code>,<code>n = 5</code>:数组排序后得到 <code>arr = [-3, 2, 6, 7, 11]</code> ,数组的中间位置为 <code>m = ((5 - 1) / 2) = 2</code> ,中位数 <code>arr[m]</code> 的值为 <code>6</code> 。</li>
38-
<li>例如 <code>arr =&nbsp;[-7, 22, 17,&thinsp;3]</code>,<code>n = 4</code>:数组排序后得到&nbsp;<code>arr = [-7, 3, 17, 22]</code> ,数组的中间位置为&nbsp;<code>m = ((4 - 1) / 2) = 1</code> ,中位数 <code>arr[m]</code> 的值为 <code>3</code> 。</li>
38+
<li>例如 <code>arr =&nbsp;[-7, 22, 17,3]</code>,<code>n = 4</code>:数组排序后得到&nbsp;<code>arr = [-7, 3, 17, 22]</code> ,数组的中间位置为&nbsp;<code>m = ((4 - 1) / 2) = 1</code> ,中位数 <code>arr[m]</code> 的值为 <code>3</code> 。</li>
3939
</ul>
4040

4141
<p>&nbsp;</p>
4242

4343
<p><strong>示例 1:</strong></p>
4444

45-
<pre><strong>输入:</strong>arr = [1,2,3,4,5], k = 2
45+
<pre>
46+
<strong>输入:</strong>arr = [1,2,3,4,5], k = 2
4647
<strong>输出:</strong>[5,1]
4748
<strong>解释:</strong>中位数为 3,按从强到弱顺序排序后,数组变为 [5,1,4,2,3]。最强的两个元素是 [5, 1]。[1, 5] 也是正确答案。
4849
注意,尽管 |5 - 3| == |1 - 3| ,但是 5 比 1 更强,因为 5 &gt; 1 。
4950
</pre>
5051

5152
<p><strong>示例 2:</strong></p>
5253

53-
<pre><strong>输入:</strong>arr = [1,1,3,5,5], k = 2
54+
<pre>
55+
<strong>输入:</strong>arr = [1,1,3,5,5], k = 2
5456
<strong>输出:</strong>[5,5]
5557
<strong>解释:</strong>中位数为 3, 按从强到弱顺序排序后,数组变为 [5,5,1,1,3]。最强的两个元素是 [5, 5]。
5658
</pre>
5759

5860
<p><strong>示例 3:</strong></p>
5961

60-
<pre><strong>输入:</strong>arr = [6,7,11,7,6,8], k = 5
62+
<pre>
63+
<strong>输入:</strong>arr = [6,7,11,7,6,8], k = 5
6164
<strong>输出:</strong>[11,8,6,6,7]
6265
<strong>解释:</strong>中位数为 7, 按从强到弱顺序排序后,数组变为 [11,8,6,6,7,7]。
63-
[11,8,6,6,7] 的任何排列都是正确答案。</pre>
64-
65-
<p><strong>示例 4:</strong></p>
66-
67-
<pre><strong>输入:</strong>arr = [6,-3,7,2,11], k = 3
68-
<strong>输出:</strong>[-3,11,2]
69-
</pre>
70-
71-
<p><strong>示例 5:</strong></p>
72-
73-
<pre><strong>输入:</strong>arr = [-7,22,17,3], k = 2
74-
<strong>输出:</strong>[22,17]
66+
[11,8,6,6,7] 的任何排列都是正确答案。
7567
</pre>
7668

7769
<p>&nbsp;</p>
7870

7971
<p><strong>提示:</strong></p>
8072

8173
<ul>
82-
<li><code>1 &lt;= arr.length &lt;= 10^5</code></li>
83-
<li><code>-10^5 &lt;= arr[i] &lt;= 10^5</code></li>
74+
<li><code>1 &lt;= arr.length &lt;= 10<sup>5</sup></code></li>
75+
<li><code>-10<sup>5</sup> &lt;= arr[i] &lt;= 10<sup>5</sup></code></li>
8476
<li><code>1 &lt;= k &lt;= arr.length</code></li>
8577
</ul>
8678

solution/1400-1499/1471.The k Strongest Values in an Array/README_EN.md

+25-7
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,43 @@ tags:
2222

2323
<p>Given an array of integers <code>arr</code> and an integer <code>k</code>.</p>
2424

25-
<p>A value <code>arr[i]</code> is said to be stronger than a value <code>arr[j]</code> if <code>|arr[i] - m| &gt; |arr[j] - m|</code> where <code>m</code> is the <strong>median</strong> of the array.<br />
25+
<p>A value <code>arr[i]</code> is said to be stronger than a value <code>arr[j]</code> if <code>|arr[i] - m| &gt; |arr[j] - m|</code> where <code>m</code> is the <strong>centre</strong> of the array.<br />
2626
If <code>|arr[i] - m| == |arr[j] - m|</code>, then <code>arr[i]</code> is said to be stronger than <code>arr[j]</code> if <code>arr[i] &gt; arr[j]</code>.</p>
2727

2828
<p>Return <em>a list of the strongest <code>k</code></em> values in the array. return the answer <strong>in any arbitrary order</strong>.</p>
2929

30-
<p><strong>Median</strong> is the middle value in an ordered integer list. More formally, if the length of the list is n, the median is the element in position <code>((n - 1) / 2)</code> in the sorted list <strong>(0-indexed)</strong>.</p>
30+
<p>The <strong>centre</strong> is the middle value in an ordered integer list. More formally, if the length of the list is n, the centre is the element in position <code>((n - 1) / 2)</code> in the sorted list <strong>(0-indexed)</strong>.</p>
3131

3232
<ul>
33-
<li>For <code>arr = [6, -3, 7, 2, 11]</code>, <code>n = 5</code> and the median is obtained by sorting the array <code>arr = [-3, 2, 6, 7, 11]</code> and the median is <code>arr[m]</code> where <code>m = ((5 - 1) / 2) = 2</code>. The median is <code>6</code>.</li>
34-
<li>For <code>arr = [-7, 22, 17,&thinsp;3]</code>, <code>n = 4</code> and the median is obtained by sorting the array <code>arr = [-7, 3, 17, 22]</code> and the median is <code>arr[m]</code> where <code>m = ((4 - 1) / 2) = 1</code>. The median is <code>3</code>.</li>
33+
<li>For <code>arr = [6, -3, 7, 2, 11]</code>, <code>n = 5</code> and the centre is obtained by sorting the array <code>arr = [-3, 2, 6, 7, 11]</code> and the centre is <code>arr[m]</code> where <code>m = ((5 - 1) / 2) = 2</code>. The centre is <code>6</code>.</li>
34+
<li>For <code>arr = [-7, 22, 17,&thinsp;3]</code>, <code>n = 4</code> and the centre is obtained by sorting the array <code>arr = [-7, 3, 17, 22]</code> and the centre is <code>arr[m]</code> where <code>m = ((4 - 1) / 2) = 1</code>. The centre is <code>3</code>.</li>
3535
</ul>
3636

37+
<div class="simple-translate-system-theme" id="simple-translate">
38+
<div>
39+
<div class="simple-translate-button isShow" style="background-image: url(&quot;moz-extension://8a9ffb6b-7e69-4e93-aae1-436a1448eff6/icons/512.png&quot;); height: 22px; width: 22px; top: 266px; left: 381px;">&nbsp;</div>
40+
41+
<div class="simple-translate-panel " style="width: 300px; height: 200px; top: 0px; left: 0px; font-size: 13px;">
42+
<div class="simple-translate-result-wrapper" style="overflow: hidden;">
43+
<div class="simple-translate-move" draggable="true">&nbsp;</div>
44+
45+
<div class="simple-translate-result-contents">
46+
<p class="simple-translate-result" dir="auto">&nbsp;</p>
47+
48+
<p class="simple-translate-candidate" dir="auto">&nbsp;</p>
49+
</div>
50+
</div>
51+
</div>
52+
</div>
53+
</div>
54+
3755
<p>&nbsp;</p>
3856
<p><strong class="example">Example 1:</strong></p>
3957

4058
<pre>
4159
<strong>Input:</strong> arr = [1,2,3,4,5], k = 2
4260
<strong>Output:</strong> [5,1]
43-
<strong>Explanation:</strong> Median is 3, the elements of the array sorted by the strongest are [5,1,4,2,3]. The strongest 2 elements are [5, 1]. [1, 5] is also <strong>accepted</strong> answer.
61+
<strong>Explanation:</strong> Centre is 3, the elements of the array sorted by the strongest are [5,1,4,2,3]. The strongest 2 elements are [5, 1]. [1, 5] is also <strong>accepted</strong> answer.
4462
Please note that although |5 - 3| == |1 - 3| but 5 is stronger than 1 because 5 &gt; 1.
4563
</pre>
4664

@@ -49,15 +67,15 @@ Please note that although |5 - 3| == |1 - 3| but 5 is stronger than 1 because 5
4967
<pre>
5068
<strong>Input:</strong> arr = [1,1,3,5,5], k = 2
5169
<strong>Output:</strong> [5,5]
52-
<strong>Explanation:</strong> Median is 3, the elements of the array sorted by the strongest are [5,5,1,1,3]. The strongest 2 elements are [5, 5].
70+
<strong>Explanation:</strong> Centre is 3, the elements of the array sorted by the strongest are [5,5,1,1,3]. The strongest 2 elements are [5, 5].
5371
</pre>
5472

5573
<p><strong class="example">Example 3:</strong></p>
5674

5775
<pre>
5876
<strong>Input:</strong> arr = [6,7,11,7,6,8], k = 5
5977
<strong>Output:</strong> [11,8,6,6,7]
60-
<strong>Explanation:</strong> Median is 7, the elements of the array sorted by the strongest are [11,8,6,6,7,7].
78+
<strong>Explanation:</strong> Centre is 7, the elements of the array sorted by the strongest are [11,8,6,6,7,7].
6179
Any permutation of [11,8,6,6,7] is <strong>accepted</strong>.
6280
</pre>
6381

solution/1600-1699/1683.Invalid Tweets/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tags:
2626
| content | varchar |
2727
+----------------+---------+
2828
在 SQL 中,tweet_id 是这个表的主键。
29-
content 只包含美式键盘上的字符,不包含其它特殊字符。
29+
content 只包含字母数字字符,'!',' ',不包含其它特殊字符。
3030
这个表包含某社交媒体 App 中所有的推文。</pre>
3131

3232
<p>&nbsp;</p>

solution/1600-1699/1683.Invalid Tweets/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ tags:
2626
| content | varchar |
2727
+----------------+---------+
2828
tweet_id is the primary key (column with unique values) for this table.
29-
content consists of characters on an American Keyboard, and no other special characters.
29+
content consists of alphanumeric characters, &#39;!&#39;, or &#39; &#39; and no other special characters.
3030
This table contains all the tweets in a social media app.
3131
</pre>
3232

solution/2100-2199/2116.Check if a Parentheses String Can Be Valid/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ tags:
7070

7171
<pre>
7272
<b>输入:</b>s = "(((())(((())", locked = "111111010111"
73-
<b>输出:</b>false
73+
<b>输出:</b>true
7474
<b>解释:</b>locked 允许我们改变 s[6] 和 s[8]。
7575
我们将 s[6] 和 s[8] 改为 ')' 使 s 变为有效字符串。
7676
</pre>

solution/2100-2199/2116.Check if a Parentheses String Can Be Valid/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Changing s[0] to either &#39;(&#39; or &#39;)&#39; will not make s valid.
6767

6868
<pre>
6969
<strong>Input:</strong> s = &quot;(((())(((())&quot;, locked = &quot;111111010111&quot;
70-
<strong>Output:</strong> false
70+
<strong>Output:</strong> true
7171
<strong>Explanation:</strong> locked permits us to change s[6] and s[8].
7272
We change s[6] and s[8] to &#39;)&#39; to make s valid.
7373
</pre>

solution/2100-2199/2138.Divide a String Into Groups of Size k/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tags:
2222
<p>A string <code>s</code> can be partitioned into groups of size <code>k</code> using the following procedure:</p>
2323

2424
<ul>
25-
<li>The first group consists of the first <code>k</code> characters of the string, the second group consists of the next <code>k</code> characters of the string, and so on. Each character can be a part of <strong>exactly one</strong> group.</li>
25+
<li>The first group consists of the first <code>k</code> characters of the string, the second group consists of the next <code>k</code> characters of the string, and so on. Each element can be a part of <strong>exactly one</strong> group.</li>
2626
<li>For the last group, if the string <strong>does not</strong> have <code>k</code> characters remaining, a character <code>fill</code> is used to complete the group.</li>
2727
</ul>
2828

solution/2200-2299/2234.Maximum Total Beauty of the Gardens/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ tags:
99
- 数组
1010
- 双指针
1111
- 二分查找
12+
- 枚举
13+
- 前缀和
1214
- 排序
1315
---
1416

solution/2200-2299/2234.Maximum Total Beauty of the Gardens/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ tags:
99
- Array
1010
- Two Pointers
1111
- Binary Search
12+
- Enumeration
13+
- Prefix Sum
1214
- Sorting
1315
---
1416

solution/2200-2299/2250.Count Number of Rectangles Containing Each Point/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: 第 290 场周赛 Q3
77
tags:
88
- 树状数组
99
- 数组
10+
- 哈希表
1011
- 二分查找
1112
- 排序
1213
---

solution/2200-2299/2250.Count Number of Rectangles Containing Each Point/README_EN.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: Weekly Contest 290 Q3
77
tags:
88
- Binary Indexed Tree
99
- Array
10+
- Hash Table
1011
- Binary Search
1112
- Sorting
1213
---

solution/2500-2599/2503.Maximum Number of Points From Grid Queries/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ tags:
3939

4040
<p>&nbsp;</p>
4141
<p><strong class="example">Example 1:</strong></p>
42-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2500-2599/2503.Maximum%20Number%20of%20Points%20From%20Grid%20Queries/images/yetgriddrawio.png" style="width: 571px; height: 151px;" />
42+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/2500-2599/2503.Maximum%20Number%20of%20Points%20From%20Grid%20Queries/images/image1.png" style="width: 571px; height: 152px;" />
4343
<pre>
4444
<strong>Input:</strong> grid = [[1,2,3],[2,5,7],[3,5,1]], queries = [5,6,2]
4545
<strong>Output:</strong> [5,8,1]

solution/2500-2599/2562.Find the Array Concatenation Value/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ tags:
3131
<p><code>nums</code>&nbsp;的 <strong>串联值</strong>&nbsp;最初等于 <code>0</code> 。执行下述操作直到&nbsp;<code>nums</code>&nbsp;变为空:</p>
3232

3333
<ul>
34-
<li>如果&nbsp;<code>nums</code>&nbsp;中存在不止一个数字,分别选中 <code>nums</code> 中的第一个元素和最后一个元素,将二者串联得到的值加到&nbsp;<code>nums</code>&nbsp;的 <strong>串联值</strong> 上,然后从&nbsp;<code>nums</code>&nbsp;中删除第一个和最后一个元素。</li>
35-
<li>如果仅存在一个元素,则将该元素的值加到&nbsp;<code>nums</code> 的串联值上,然后删除这个元素。</li>
34+
<li>如果&nbsp;<code>nums</code>&nbsp;的长度大于 1,分别选中 <code>nums</code> 中的第一个元素和最后一个元素,将二者串联得到的值加到&nbsp;<code>nums</code>&nbsp;的 <strong>串联值</strong> 上,然后从&nbsp;<code>nums</code>&nbsp;中删除第一个和最后一个元素。例如,如果&nbsp;<code>nums</code> 是 <code>[1, 2, 4, 5, 6]</code>,将 16 添加到串联值。</li>
35+
<li>如果&nbsp;<code>nums</code>&nbsp;中仅存在一个元素,则将该元素的值加到&nbsp;<code>nums</code> 的串联值上,然后删除这个元素。</li>
3636
</ul>
3737

3838
<p>返回执行完所有操作后<em>&nbsp;</em><code>nums</code> 的串联值。</p>

solution/2500-2599/2562.Find the Array Concatenation Value/README_EN.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ tags:
3131
<p>The <strong>concatenation value</strong> of <code>nums</code> is initially equal to <code>0</code>. Perform this operation until <code>nums</code> becomes empty:</p>
3232

3333
<ul>
34-
<li>If there exists more than one number in <code>nums</code>, pick the first element and last element in <code>nums</code> respectively and add the value of their concatenation to the <strong>concatenation value</strong> of <code>nums</code>, then delete the first and last element from <code>nums</code>.</li>
35-
<li>If one element exists, add its value to the <strong>concatenation value</strong> of <code>nums</code>, then delete it.</li>
34+
<li>If <code>nums</code> has a size greater than one, add the value of the concatenation of the first and the last element to the <strong>concatenation value</strong> of <code>nums</code>, and remove those two elements from <code>nums</code>. For example, if the <code>nums</code> was <code>[1, 2, 4, 5, 6]</code>, add 16 to the <code>concatenation value</code>.</li>
35+
<li>If only one element exists in <code>nums</code>, add its value to the <strong>concatenation value</strong> of <code>nums</code>, then remove it.</li>
3636
</ul>
3737

38-
<p>Return<em> the concatenation value of the <code>nums</code></em>.</p>
38+
<p>Return<em> the concatenation value of <code>nums</code></em>.</p>
3939

4040
<p>&nbsp;</p>
4141
<p><strong class="example">Example 1:</strong></p>

solution/2700-2799/2701.Consecutive Transactions with Increasing Amounts/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Each row contains information about transactions that includes unique (customer_
3333

3434
<p>Write an SQL query to find the customers who have made consecutive transactions with increasing <code>amount</code>&nbsp;for at least three consecutive days. Include the <code>customer_id</code>,&nbsp;start date of the consecutive transactions&nbsp;period and the end date of the consecutive transactions period. There can be multiple consecutive transactions by a customer.</p>
3535

36-
<p>Return <em>the result table ordered by</em> <code>customer_id</code> <em>in <strong>ascending</strong> order.</em></p>
36+
<p>Return <em>the result table ordered by</em> <code>customer_id, consecutive_start, consecutive_end</code> <em>in <strong>ascending</strong> order.</em></p>
3737

3838
<p>The query result format is in the following example.</p>
3939

solution/2900-2999/2965.Find Missing and Repeated Values/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tags:
5050
<li><code>1 &lt;= grid[i][j] &lt;= n * n</code></li>
5151
<li>For all <code>x</code> that <code>1 &lt;= x &lt;= n * n</code> there is exactly one <code>x</code> that is not equal to any of the grid members.</li>
5252
<li>For all <code>x</code> that <code>1 &lt;= x &lt;= n * n</code> there is exactly one <code>x</code> that is equal to exactly two of the grid members.</li>
53-
<li>For all <code>x</code> that <code>1 &lt;= x &lt;= n * n</code> except two of them there is exatly one pair of <code>i, j</code> that <code>0 &lt;= i, j &lt;= n - 1</code> and <code>grid[i][j] == x</code>.</li>
53+
<li>For all <code>x</code> that <code>1 &lt;= x &lt;= n * n</code> except two of them there is exactly one pair of <code>i, j</code> that <code>0 &lt;= i, j &lt;= n - 1</code> and <code>grid[i][j] == x</code>.</li>
5454
</ul>
5555

5656
<!-- description:end -->

solution/3100-3199/3138.Minimum Length of Anagram Concatenation/README.md

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ tags:
5050
<p><strong>解释:</strong></p>
5151

5252
<p>一个可能的字符串&nbsp;<code>t</code>&nbsp;&nbsp;<code>"cdef"</code>&nbsp;,注意&nbsp;<code>t</code>&nbsp;可能等于&nbsp;<code>s</code>&nbsp;。</p>
53+
54+
<p><strong class="example">示例</strong><strong>&nbsp;3:</strong></p>
55+
56+
<p><strong>输入:</strong>s = "abcbcacabbaccba"</p>
57+
58+
<p><b>输出:</b>3</p>
5359
</div>
5460

5561
<p>&nbsp;</p>

solution/3100-3199/3138.Minimum Length of Anagram Concatenation/README_EN.md

+8
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ tags:
5151
<p>One possible string <code>t</code> could be <code>&quot;cdef&quot;</code>, notice that <code>t</code> can be equal to <code>s</code>.</p>
5252
</div>
5353

54+
<p><strong class="example">Example 2:</strong></p>
55+
56+
<div class="example-block">
57+
<p><strong>Input:</strong> <span class="example-io">s = &quot;abcbcacabbaccba&quot;</span></p>
58+
59+
<p><strong>Output:</strong> <span class="example-io">3</span></p>
60+
</div>
61+
5462
<p>&nbsp;</p>
5563
<p><strong>Constraints:</strong></p>
5664

solution/3100-3199/3147.Taking Maximum Energy From the Mystic Dungeon/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ tags:
2727

2828
<p>You are given an array <code>energy</code> and an integer <code>k</code>. Return the <strong>maximum</strong> possible energy you can gain.</p>
2929

30+
<p><strong>Note</strong> that when you are reach a magician, you <em>must</em> take energy from them, whether it is negative or positive energy.</p>
31+
3032
<p>&nbsp;</p>
3133
<p><strong class="example">Example 1:</strong></p>
3234

0 commit comments

Comments
 (0)