Skip to content

Commit 7deedf5

Browse files
committed
更新国外版力扣题目描述变更
1 parent 7646741 commit 7deedf5

11 files changed

+38
-25
lines changed

leetcode/problem/2-keys-keyboard.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p>There is only one character <code>&#39;A&#39;</code> on the screen of a notepad. You can perform two operations on this notepad for each step:</p>
1+
<p>There is only one character <code>&#39;A&#39;</code> on the screen of a notepad. You can perform one of two operations on this notepad for each step:</p>
22

33
<ul>
44
<li>Copy All: You can copy all the characters present on the screen (a partial copy is not allowed).</li>
@@ -13,7 +13,7 @@
1313
<pre>
1414
<strong>Input:</strong> n = 3
1515
<strong>Output:</strong> 3
16-
<strong>Explanation:</strong> Intitally, we have one character &#39;A&#39;.
16+
<strong>Explanation:</strong> Initially, we have one character &#39;A&#39;.
1717
In step 1, we use Copy All operation.
1818
In step 2, we use Paste operation to get &#39;AA&#39;.
1919
In step 3, we use Paste operation to get &#39;AAA&#39;.

leetcode/problem/3sum-with-multiplicity.html

+8
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
and two 2s from [2,2,2,2] in 6 ways.
2828
</pre>
2929

30+
<p><strong>Example 3:</strong></p>
31+
32+
<pre>
33+
<strong>Input:</strong> arr = [2,1,3], target = 6
34+
<strong>Output:</strong> 1
35+
<strong>Explanation:</strong> (1, 2, 3) occured one time in the array so we return 1.
36+
</pre>
37+
3038
<p>&nbsp;</p>
3139
<p><strong>Constraints:</strong></p>
3240

leetcode/problem/avoid-flood-in-the-city.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<p>Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the <code>nth</code> lake, the <code>nth</code> lake becomes full of water. If it rains over a lake which is <strong>full of water</strong>, there will be a <strong>flood</strong>. Your goal is to avoid the flood in any lake.</p>
1+
<p>Your country has an infinite number of lakes. Initially, all the lakes are empty, but when it rains over the <code>nth</code> lake, the <code>nth</code> lake becomes full of water. If it rains over a lake that is <strong>full of water</strong>, there will be a <strong>flood</strong>. Your goal is to avoid floods in any lake.</p>
22

33
<p>Given an integer array <code>rains</code> where:</p>
44

@@ -17,7 +17,7 @@
1717

1818
<p>If there are multiple valid answers return <strong>any</strong> of them. If it is impossible to avoid flood return <strong>an empty array</strong>.</p>
1919

20-
<p>Notice that if you chose to dry a full lake, it becomes empty, but if you chose to dry an empty lake, nothing changes. (see example 4)</p>
20+
<p>Notice that if you chose to dry a full lake, it becomes empty, but if you chose to dry an empty lake, nothing changes.</p>
2121

2222
<p>&nbsp;</p>
2323
<p><strong>Example 1:</strong></p>

leetcode/problem/baseball-game.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<li><code>&quot;C&quot;</code> - Invalidate the previous score, removing it from the record. It is guaranteed there will always be a previous score.</li>
1010
</ol>
1111

12-
<p>Return <em>the sum of all the scores on the record</em>.</p>
12+
<p>Return <em>the sum of all the scores on the record</em>. The test cases are generated so that the answer fits in a 32-bit integer.</p>
1313

1414
<p>&nbsp;</p>
1515
<p><strong>Example 1:</strong></p>

leetcode/problem/broken-calculator.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
<p><strong>Constraints:</strong></p>
3737

3838
<ul>
39-
<li><code>1 &lt;= x, y &lt;= 10<sup>9</sup></code></li>
39+
<li><code>1 &lt;= startValue, target &lt;= 10<sup>9</sup></code></li>
4040
</ul>

leetcode/problem/consecutive-numbers.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
| num | varchar |
99
+-------------+---------+
1010
id is the primary key for this table.
11+
id is an autoincrement column.
1112
</pre>
1213

1314
<p>&nbsp;</p>

leetcode/problem/count-unique-characters-of-all-substrings-of-a-given-string.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<strong>Input:</strong> s = &quot;ABC&quot;
1616
<strong>Output:</strong> 10
1717
<strong>Explanation: </strong>All possible substrings are: &quot;A&quot;,&quot;B&quot;,&quot;C&quot;,&quot;AB&quot;,&quot;BC&quot; and &quot;ABC&quot;.
18-
Evey substring is composed with only unique letters.
18+
Every substring is composed with only unique letters.
1919
Sum of lengths of all substring is 1 + 1 + 1 + 2 + 2 + 3 = 10
2020
</pre>
2121

leetcode/problem/encrypt-and-decrypt-strings.html

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<li>Replace <code>c</code> with <code>values[i]</code> in the string.</li>
88
</ol>
99

10+
<p>Note that in case a character of the string is <strong>not present</strong> in <code>keys</code>, the encryption process cannot be carried out, and an empty string <code>&quot;&quot;</code> is returned.</p>
11+
1012
<p>A string is <strong>decrypted</strong> with the following process:</p>
1113

1214
<ol>

leetcode/problem/shuffle-an-array.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@
3232
<p><strong>Constraints:</strong></p>
3333

3434
<ul>
35-
<li><code>1 &lt;= nums.length &lt;= 200</code></li>
35+
<li><code>1 &lt;= nums.length &lt;= 50</code></li>
3636
<li><code>-10<sup>6</sup> &lt;= nums[i] &lt;= 10<sup>6</sup></code></li>
3737
<li>All the elements of <code>nums</code> are <strong>unique</strong>.</li>
38-
<li>At most <code>5 * 10<sup>4</sup></code> calls <strong>in total</strong> will be made to <code>reset</code> and <code>shuffle</code>.</li>
38+
<li>At most <code>10<sup>4</sup></code> calls <strong>in total</strong> will be made to <code>reset</code> and <code>shuffle</code>.</li>
3939
</ul>

leetcode/problem/unique-paths-ii.html

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
<p>A robot is located at the top-left corner of a <code>m x n</code> grid (marked &#39;Start&#39; in the diagram below).</p>
1+
<p>You are given an <code>m x n</code> integer array <code>grid</code>. There is a robot initially located at the <b>top-left corner</b> (i.e., <code>grid[0][0]</code>). The robot tries to move to the <strong>bottom-right corner</strong> (i.e., <code>grid[m-1][n-1]</code>). The robot can only move either down or right at any point in time.</p>
22

3-
<p>The robot can only move either down or right at any point in time. The robot is trying to reach the bottom-right corner of the grid (marked &#39;Finish&#39; in the diagram below).</p>
3+
<p>An obstacle and space are marked as <code>1</code> or <code>0</code> respectively in <code>grid</code>. A path that the robot takes cannot include <strong>any</strong> square that is an obstacle.</p>
44

5-
<p>Now consider if some obstacles are added to the grids. How many unique paths would there be?</p>
5+
<p>Return <em>the number of possible unique paths that the robot can take to reach the bottom-right corner</em>.</p>
66

7-
<p>An obstacle and space is marked as <code>1</code> and <code>0</code> respectively in the grid.</p>
7+
<p>The testcases are generated so that the answer will be less than or equal to <code>2 * 10<sup>9</sup></code>.</p>
88

99
<p>&nbsp;</p>
1010
<p><strong>Example 1:</strong></p>
@@ -29,8 +29,8 @@
2929
<p><strong>Constraints:</strong></p>
3030

3131
<ul>
32-
<li><code>m ==&nbsp;obstacleGrid.length</code></li>
33-
<li><code>n ==&nbsp;obstacleGrid[i].length</code></li>
32+
<li><code>m == obstacleGrid.length</code></li>
33+
<li><code>n == obstacleGrid[i].length</code></li>
3434
<li><code>1 &lt;= m, n &lt;= 100</code></li>
3535
<li><code>obstacleGrid[i][j]</code> is <code>0</code> or <code>1</code>.</li>
3636
</ul>

leetcode/problem/utf-8-validation.html

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<p>Given an integer array <code>data</code> representing the data, return whether it is a valid <strong>UTF-8</strong> encoding.</p>
1+
<p>Given an integer array <code>data</code> representing the data, return whether it is a valid <strong>UTF-8</strong> encoding (i.e. it translates to a sequence of valid UTF-8 encoded characters).</p>
22

3-
<p>A character in <strong>UTF8</strong> can be from <b>1 to 4 bytes</b> long, subjected to the following rules:</p>
3+
<p>A character in <strong>UTF8</strong> can be from <strong>1 to 4 bytes</strong> long, subjected to the following rules:</p>
44

55
<ol>
66
<li>For a <strong>1-byte</strong> character, the first bit is a <code>0</code>, followed by its Unicode code.</li>
@@ -10,16 +10,18 @@
1010
<p>This is how the UTF-8 encoding would work:</p>
1111

1212
<pre>
13-
<code> Char. number range | UTF-8 octet sequence
14-
(hexadecimal) | (binary)
15-
--------------------+---------------------------------------------
16-
0000 0000-0000 007F | 0xxxxxxx
17-
0000 0080-0000 07FF | 110xxxxx 10xxxxxx
18-
0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
19-
0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx</code>
13+
Number of Bytes | UTF-8 Octet Sequence
14+
| (binary)
15+
--------------------+-----------------------------------------
16+
1 | 0xxxxxxx
17+
2 | 110xxxxx 10xxxxxx
18+
3 | 1110xxxx 10xxxxxx 10xxxxxx
19+
4 | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
2020
</pre>
2121

22-
<p><b>Note: </b>The input is an array of integers. Only the <b>least significant 8 bits</b> of each integer is used to store the data. This means each integer represents only 1 byte of data.</p>
22+
<p><code>x</code> denotes a bit in the binary form of a byte that may be either <code>0</code> or <code>1</code>.</p>
23+
24+
<p><strong>Note: </strong>The input is an array of integers. Only the <strong>least significant 8 bits</strong> of each integer is used to store the data. This means each integer represents only 1 byte of data.</p>
2325

2426
<p>&nbsp;</p>
2527
<p><strong>Example 1:</strong></p>

0 commit comments

Comments
 (0)