Skip to content

Commit 41aa731

Browse files
authored
feat: update lc problems (doocs#2243)
1 parent c22e956 commit 41aa731

File tree

144 files changed

+841
-789
lines changed

Some content is hidden

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

144 files changed

+841
-789
lines changed

solution/0000-0099/0080.Remove Duplicates from Sorted Array II/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ for (int i = 0; i < len; i++) {
4646
<pre>
4747
<strong>输入:</strong>nums = [0,0,1,1,1,1,2,3,3]
4848
<strong>输出:</strong>7, nums = [0,0,1,1,2,3,3]
49-
<strong>解释:</strong>函数应返回新长度 length = <strong><code>7</code></strong>, 并且原数组的前五个元素被修改为&nbsp;<strong><code>0, 0, 1, 1, 2, 3, 3</code></strong>。不需要考虑数组中超出新长度后面的元素。
49+
<strong>解释:</strong>函数应返回新长度 length = <strong><code>7</code></strong>, 并且原数组的前七个元素被修改为&nbsp;<strong><code>0, 0, 1, 1, 2, 3, 3</code></strong>。不需要考虑数组中超出新长度后面的元素。
5050
</pre>
5151

5252
<p>&nbsp;</p>

solution/0100-0199/0139.Word Break/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给你一个字符串 <code>s</code> 和一个字符串列表 <code>wordDict</code> 作为字典。请你判断是否可以利用字典中出现的单词拼接出 <code>s</code> 。</p>
9+
<p>给你一个字符串 <code>s</code> 和一个字符串列表 <code>wordDict</code> 作为字典。如果可以利用字典中出现的一个或多个单词拼接出 <code>s</code>&nbsp;则返回 <code>true</code>。</p>
1010

1111
<p><strong>注意:</strong>不要求字典中出现的单词全部都使用,并且字典中的单词可以重复使用。</p>
1212

solution/0100-0199/0153.Find Minimum in Rotated Sorted Array/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<pre>
3535
<strong>输入:</strong>nums = [4,5,6,7,0,1,2]
3636
<strong>输出:</strong>0
37-
<strong>解释:</strong>原数组为 [0,1,2,4,5,6,7] ,旋转 4 次得到输入数组。
37+
<strong>解释:</strong>原数组为 [0,1,2,4,5,6,7] ,旋转 3 次得到输入数组。
3838
</pre>
3939

4040
<p><strong>示例 3:</strong></p>

solution/0300-0399/0320.Generalized Abbreviation/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ul>
1212
<li>例如,<code>"abcde"</code> 可以缩写为:
13+
1314
<ul>
1415
<li><code>"a3e"</code>(<code>"bcd"</code> 变为 <code>"3"</code> )</li>
1516
<li><code>"1bcd1"</code>(<code>"a"</code> 和 <code>"e"</code> 都变为 <code>"1"</code>)<meta charset="UTF-8" /></li>
@@ -23,6 +24,7 @@
2324
<li><meta charset="UTF-8" /><code>"22de"</code>&nbsp;(<code>"ab"</code> 变为&nbsp;<code>"2"</code>&nbsp;,&nbsp;<code>"bc"</code>&nbsp;变为&nbsp;<code>"2"</code>) &nbsp;是无效的,因为被选择的字符串是重叠的</li>
2425
</ul>
2526
</li>
27+
2628
</ul>
2729

2830
<p>给你一个字符串&nbsp;<code>word</code> ,返回&nbsp;<em>一个由</em>&nbsp;<code>word</code> 的<em>所有可能 <strong>广义缩写词</strong> 组成的列表</em>&nbsp;。按 <strong>任意顺序</strong> 返回答案。</p>

solution/0300-0399/0320.Generalized Abbreviation/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
<ul>
1010
<li>For example, <code>&quot;abcde&quot;</code> can be abbreviated into:
11+
1112
<ul>
1213
<li><code>&quot;a3e&quot;</code> (<code>&quot;bcd&quot;</code> turned into <code>&quot;3&quot;</code>)</li>
1314
<li><code>&quot;1bcd1&quot;</code> (<code>&quot;a&quot;</code> and <code>&quot;e&quot;</code> both turned into <code>&quot;1&quot;</code>)</li>
@@ -21,6 +22,7 @@
2122
<li><code>&quot;22de&quot;</code> (<code>&quot;ab&quot;</code> turned into <code>&quot;2&quot;</code> and <code>&quot;bc&quot;</code> turned into <code>&quot;2&quot;</code>) is invalid as the substring chosen overlap.</li>
2223
</ul>
2324
</li>
25+
2426
</ul>
2527

2628
<p>Given a string <code>word</code>, return <em>a list of all the possible <strong>generalized abbreviations</strong> of</em> <code>word</code>. Return the answer in <strong>any order</strong>.</p>

solution/0300-0399/0375.Guess Number Higher or Lower II/README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@
2727
<strong>输出:</strong>16
2828
<strong>解释:</strong>制胜策略如下:
2929
- 数字范围是 [1,10] 。你先猜测数字为 7 。
30-
&nbsp; - 如果这是我选中的数字,你的总费用为 0 。否则,你需要支付 7 。
30+
&nbsp; - 如果这是我选中的数字,你的总费用为 $0 。否则,你需要支付 $7 。
3131
&nbsp; - 如果我的数字更大,则下一步需要猜测的数字范围是 [8,10] 。你可以猜测数字为 9 。
32-
&nbsp; - 如果这是我选中的数字,你的总费用为 7 。否则,你需要支付 9 。
33-
&nbsp; - 如果我的数字更大,那么这个数字一定是 10 。你猜测数字为 10 并赢得游戏,总费用为 7 + 9 = 16 。
34-
&nbsp; - 如果我的数字更小,那么这个数字一定是 8 。你猜测数字为 8 并赢得游戏,总费用为 7 + 9 = 16 。
32+
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 。否则,你需要支付 $9 。
33+
&nbsp; - 如果我的数字更大,那么这个数字一定是 10 。你猜测数字为 10 并赢得游戏,总费用为 $7 + $9 = $16 。
34+
&nbsp; - 如果我的数字更小,那么这个数字一定是 8 。你猜测数字为 8 并赢得游戏,总费用为 $7 + $9 = $16 。
3535
&nbsp; - 如果我的数字更小,则下一步需要猜测的数字范围是 [1,6] 。你可以猜测数字为 3 。
36-
&nbsp; - 如果这是我选中的数字,你的总费用为 7 。否则,你需要支付 3 。
36+
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 。否则,你需要支付 $3 。
3737
&nbsp; - 如果我的数字更大,则下一步需要猜测的数字范围是 [4,6] 。你可以猜测数字为 5 。
38-
&nbsp; - 如果这是我选中的数字,你的总费用为 7 + 3 = 10 。否则,你需要支付 5 。
39-
&nbsp; - 如果我的数字更大,那么这个数字一定是 6 。你猜测数字为 6 并赢得游戏,总费用为 7 + 3 + 5 = 15 。
40-
&nbsp; - 如果我的数字更小,那么这个数字一定是 4 。你猜测数字为 4 并赢得游戏,总费用为 7 + 3 + 5 = 15 。
38+
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 + $3 = $10 。否则,你需要支付 $5 。
39+
&nbsp; - 如果我的数字更大,那么这个数字一定是 6 。你猜测数字为 6 并赢得游戏,总费用为 $7 + $3 + $5 = $15 。
40+
&nbsp; - 如果我的数字更小,那么这个数字一定是 4 。你猜测数字为 4 并赢得游戏,总费用为 $7 + $3 + $5 = $15 。
4141
&nbsp; - 如果我的数字更小,则下一步需要猜测的数字范围是 [1,2] 。你可以猜测数字为 1 。
42-
&nbsp; - 如果这是我选中的数字,你的总费用为 7 + 3 = 10 。否则,你需要支付 1 。
43-
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 7 + 3 + 1 = 11 。
44-
在最糟糕的情况下,你需要支付 16 。因此,你只需要 16 就可以确保自己赢得游戏。
42+
&nbsp; - 如果这是我选中的数字,你的总费用为 $7 + $3 = $10 。否则,你需要支付 $1 。
43+
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 $7 + $3 + $1 = $11 。
44+
在最糟糕的情况下,你需要支付 $16 。因此,你只需要 $16 就可以确保自己赢得游戏。
4545
</pre>
4646

4747
<p><strong>示例 2:</strong></p>
@@ -59,9 +59,9 @@
5959
<strong>输出:</strong>1
6060
<strong>解释:</strong>有两个可能的数字 1 和 2 。
6161
- 你可以先猜 1 。
62-
&nbsp; - 如果这是我选中的数字,你的总费用为 0 。否则,你需要支付 1 。
63-
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 1 。
64-
最糟糕的情况下,你需要支付 1 。
62+
&nbsp; - 如果这是我选中的数字,你的总费用为 $0 。否则,你需要支付 $1 。
63+
&nbsp; - 如果我的数字更大,那么这个数字一定是 2 。你猜测数字为 2 并赢得游戏,总费用为 $1 。
64+
最糟糕的情况下,你需要支付 $1 。
6565
</pre>
6666

6767
<p>&nbsp;</p>

solution/0300-0399/0375.Guess Number Higher or Lower II/README_EN.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@
2424
<strong>Output:</strong> 16
2525
<strong>Explanation:</strong> The winning strategy is as follows:
2626
- The range is [1,10]. Guess 7.
27-
&nbsp; - If this is my number, your total is 0. Otherwise, you pay 7.
27+
&nbsp; - If this is my number, your total is $0. Otherwise, you pay $7.
2828
&nbsp; - If my number is higher, the range is [8,10]. Guess 9.
29-
&nbsp; - If this is my number, your total is 7. Otherwise, you pay 9.
30-
&nbsp; - If my number is higher, it must be 10. Guess 10. Your total is 7 + 9 = 16.
31-
&nbsp; - If my number is lower, it must be 8. Guess 8. Your total is 7 + 9 = 16.
29+
&nbsp; - If this is my number, your total is $7. Otherwise, you pay $9.
30+
&nbsp; - If my number is higher, it must be 10. Guess 10. Your total is $7 + $9 = $16.
31+
&nbsp; - If my number is lower, it must be 8. Guess 8. Your total is $7 + $9 = $16.
3232
&nbsp; - If my number is lower, the range is [1,6]. Guess 3.
33-
&nbsp; - If this is my number, your total is 7. Otherwise, you pay 3.
33+
&nbsp; - If this is my number, your total is $7. Otherwise, you pay $3.
3434
&nbsp; - If my number is higher, the range is [4,6]. Guess 5.
35-
&nbsp; - If this is my number, your total is 7 + 3 = 10. Otherwise, you pay 5.
36-
&nbsp; - If my number is higher, it must be 6. Guess 6. Your total is 7 + 3 + 5 = 15.
37-
&nbsp; - If my number is lower, it must be 4. Guess 4. Your total is 7 + 3 + 5 = 15.
35+
&nbsp; - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $5.
36+
&nbsp; - If my number is higher, it must be 6. Guess 6. Your total is $7 + $3 + $5 = $15.
37+
&nbsp; - If my number is lower, it must be 4. Guess 4. Your total is $7 + $3 + $5 = $15.
3838
&nbsp; - If my number is lower, the range is [1,2]. Guess 1.
39-
&nbsp; - If this is my number, your total is 7 + 3 = 10. Otherwise, you pay 1.
40-
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is 7 + 3 + 1 = 11.
41-
The worst case in all these scenarios is that you pay 16. Hence, you only need 16 to guarantee a win.
39+
&nbsp; - If this is my number, your total is $7 + $3 = $10. Otherwise, you pay $1.
40+
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is $7 + $3 + $1 = $11.
41+
The worst case in all these scenarios is that you pay $16. Hence, you only need $16 to guarantee a win.
4242
</pre>
4343

4444
<p><strong class="example">Example 2:</strong></p>
@@ -56,9 +56,9 @@ The worst case in all these scenarios is that you pay 16. Hence, you only need 1
5656
<strong>Output:</strong> 1
5757
<strong>Explanation:</strong>&nbsp;There are two possible numbers, 1 and 2.
5858
- Guess 1.
59-
&nbsp; - If this is my number, your total is 0. Otherwise, you pay 1.
60-
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is 1.
61-
The worst case is that you pay 1.
59+
&nbsp; - If this is my number, your total is $0. Otherwise, you pay $1.
60+
&nbsp; - If my number is higher, it must be 2. Guess 2. Your total is $1.
61+
The worst case is that you pay $1.
6262
</pre>
6363

6464
<p>&nbsp;</p>

solution/0400-0499/0447.Number of Boomerangs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给定平面上<em>&nbsp;</em><code>n</code><em> </em>对 <strong>互不相同</strong> 的点&nbsp;<code>points</code> ,其中 <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 。<strong>回旋镖</strong> 是由点&nbsp;<code>(i, j, k)</code> 表示的元组 ,其中&nbsp;<code>i</code>&nbsp;&nbsp;<code>j</code>&nbsp;之间的距离和&nbsp;<code>i</code>&nbsp;&nbsp;<code>k</code>&nbsp;之间的欧式距离相等(<strong>需要考虑元组的顺序</strong>)。</p>
9+
<p>给定平面上<em>&nbsp;</em><code>n</code><em> </em>对 <strong>互不相同</strong> 的点&nbsp;<code>points</code> ,其中 <code>points[i] = [x<sub>i</sub>, y<sub>i</sub>]</code> 。<strong>回旋镖</strong> 是由点&nbsp;<code>(i, j, k)</code> 表示的元组 ,其中&nbsp;<code>i</code>&nbsp;&nbsp;<code>j</code>&nbsp;之间的欧式距离和&nbsp;<code>i</code>&nbsp;&nbsp;<code>k</code>&nbsp;之间的欧式距离相等(<strong>需要考虑元组的顺序</strong>)。</p>
1010

1111
<p>返回平面上所有回旋镖的数量。</p>
1212
&nbsp;

solution/0400-0499/0465.Optimal Account Balancing/README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<!-- 这里写题目描述 -->
88

9-
<p>给你一个表示交易的数组 <code>transactions</code> ,其中 <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> 表示 <code>ID = from<sub>i</sub></code> 的人给&nbsp;<code>ID = to<sub>i</sub></code> 的人共计 <code>amount<sub>i</sub> </code> 。</p>
9+
<p>给你一个表示交易的数组 <code>transactions</code> ,其中 <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> 表示 <code>ID = from<sub>i</sub></code> 的人给&nbsp;<code>ID = to<sub>i</sub></code> 的人共计 <code>amount<sub>i</sub> $</code> 。</p>
1010

1111
<p>请你计算并返回还清所有债务的最小交易笔数。</p>
1212

@@ -18,21 +18,21 @@
1818
<strong>输入:</strong>transactions = [[0,1,10],[2,0,5]]
1919
<strong>输出:</strong>2
2020
<strong>解释:</strong>
21-
#0 给 #1 10 。
22-
#2 给 #0 5 。
23-
需要进行两笔交易。一种结清债务的方式是 #1 给 #0 和 #2 各 5 。</pre>
21+
#0 给 #1 $10 。
22+
#2 给 #0 $5 。
23+
需要进行两笔交易。一种结清债务的方式是 #1 给 #0 和 #2 各 $5 。</pre>
2424

2525
<p><strong class="example">示例 2:</strong></p>
2626

2727
<pre>
2828
<strong>输入:</strong>transactions = [[0,1,10],[1,0,1],[1,2,5],[2,0,5]]
2929
<strong>输出:</strong>1
3030
<strong>解释:</strong>
31-
#0 给 #1 10 。
32-
#1 给 #0 1 。
33-
#1 给 #2 5 。
34-
#2 给 #0 5 。
35-
因此,#1 只需要给 #0 4 ,所有的债务即可还清。
31+
#0 给 #1 $10 。
32+
#1 给 #0 $1 。
33+
#1 给 #2 $5 。
34+
#2 给 #0 $5 。
35+
因此,#1 只需要给 #0 $4 ,所有的债务即可还清。
3636
</pre>
3737

3838
<p>&nbsp;</p>

solution/0400-0499/0465.Optimal Account Balancing/README_EN.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## Description
66

7-
<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> </code> to the person with <code>ID = to<sub>i</sub></code>.</p>
7+
<p>You are given an array of transactions <code>transactions</code> where <code>transactions[i] = [from<sub>i</sub>, to<sub>i</sub>, amount<sub>i</sub>]</code> indicates that the person with <code>ID = from<sub>i</sub></code> gave <code>amount<sub>i</sub> $</code> to the person with <code>ID = to<sub>i</sub></code>.</p>
88

99
<p>Return <em>the minimum number of transactions required to settle the debt</em>.</p>
1010

@@ -15,9 +15,9 @@
1515
<strong>Input:</strong> transactions = [[0,1,10],[2,0,5]]
1616
<strong>Output:</strong> 2
1717
<strong>Explanation:</strong>
18-
Person #0 gave person #1 10.
19-
Person #2 gave person #0 5.
20-
Two transactions are needed. One way to settle the debt is person #1 pays person #0 and #2 5 each.
18+
Person #0 gave person #1 $10.
19+
Person #2 gave person #0 $5.
20+
Two transactions are needed. One way to settle the debt is person #1 pays person #0 and #2 $5 each.
2121
</pre>
2222

2323
<p><strong class="example">Example 2:</strong></p>
@@ -26,11 +26,11 @@ Two transactions are needed. One way to settle the debt is person #1 pays person
2626
<strong>Input:</strong> transactions = [[0,1,10],[1,0,1],[1,2,5],[2,0,5]]
2727
<strong>Output:</strong> 1
2828
<strong>Explanation:</strong>
29-
Person #0 gave person #1 10.
30-
Person #1 gave person #0 1.
31-
Person #1 gave person #2 5.
32-
Person #2 gave person #0 5.
33-
Therefore, person #1 only need to give person #0 4, and all debt is settled.
29+
Person #0 gave person #1 $10.
30+
Person #1 gave person #0 $1.
31+
Person #1 gave person #2 $5.
32+
Person #2 gave person #0 $5.
33+
Therefore, person #1 only need to give person #0 $4, and all debt is settled.
3434
</pre>
3535

3636
<p>&nbsp;</p>

solution/0500-0599/0549.Binary Tree Longest Consecutive Sequence II/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [549. 二叉树中最长的连续序列](https://leetcode.cn/problems/binary-tree-longest-consecutive-sequence-ii)
1+
# [549. 二叉树最长连续序列 II](https://leetcode.cn/problems/binary-tree-longest-consecutive-sequence-ii)
22

33
[English Version](/solution/0500-0599/0549.Binary%20Tree%20Longest%20Consecutive%20Sequence%20II/README_EN.md)
44

solution/0600-0699/0638.Shopping Offers/README_EN.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
<pre>
1919
<strong>Input:</strong> price = [2,5], special = [[3,0,5],[1,2,10]], needs = [3,2]
2020
<strong>Output:</strong> 14
21-
<strong>Explanation:</strong> There are two kinds of items, A and B. Their prices are 2 and 5 respectively.
22-
In special offer 1, you can pay 5 for 3A and 0B
23-
In special offer 2, you can pay 10 for 1A and 2B.
24-
You need to buy 3A and 2B, so you may pay 10 for 1A and 2B (special offer #2), and 4 for 2A.
21+
<strong>Explanation:</strong> There are two kinds of items, A and B. Their prices are $2 and $5 respectively.
22+
In special offer 1, you can pay $5 for 3A and 0B
23+
In special offer 2, you can pay $10 for 1A and 2B.
24+
You need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A.
2525
</pre>
2626

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

2929
<pre>
3030
<strong>Input:</strong> price = [2,3,4], special = [[1,1,0,4],[2,2,1,9]], needs = [1,2,1]
3131
<strong>Output:</strong> 11
32-
<strong>Explanation:</strong> The price of A is 2, and 3 for B, 4 for C.
33-
You may pay 4 for 1A and 1B, and 9 for 2A ,2B and 1C.
34-
You need to buy 1A ,2B and 1C, so you may pay 4 for 1A and 1B (special offer #1), and 3 for 1B, 4 for 1C.
35-
You cannot add more items, though only 9 for 2A ,2B and 1C.
32+
<strong>Explanation:</strong> The price of A is $2, and $3 for B, $4 for C.
33+
You may pay $4 for 1A and 1B, and $9 for 2A ,2B and 1C.
34+
You need to buy 1A ,2B and 1C, so you may pay $4 for 1A and 1B (special offer #1), and $3 for 1B, $4 for 1C.
35+
You cannot add more items, though only $9 for 2A ,2B and 1C.
3636
</pre>
3737

3838
<p>&nbsp;</p>

solution/0600-0699/0679.24 Game/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
<ul>
1414
<li>除法运算符 <code>'/'</code> 表示实数除法,而不是整数除法。
15+
1516
<ul>
1617
<li>例如,&nbsp;<code>4 /(1 - 2 / 3)= 4 /(1 / 3)= 12</code>&nbsp;。</li>
1718
</ul>
@@ -26,6 +27,7 @@
2627
<li>例如,如果 <code>cards =[1,2,1,2]</code> ,则表达式 <code>“12 + 12”</code> 无效。</li>
2728
</ul>
2829
</li>
30+
2931
</ul>
3032

3133
<p>如果可以得到这样的表达式,其计算结果为 <code>24</code> ,则返回 <code>true </code>,否则返回 <code>false</code>&nbsp;。</p>

solution/0600-0699/0679.24 Game/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ul>
1212
<li>The division operator <code>&#39;/&#39;</code> represents real division, not integer division.
13+
1314
<ul>
1415
<li>For example, <code>4 / (1 - 2 / 3) = 4 / (1 / 3) = 12</code>.</li>
1516
</ul>
@@ -24,6 +25,7 @@
2425
<li>For example, if <code>cards = [1, 2, 1, 2]</code>, the expression <code>&quot;12 + 12&quot;</code> is not valid.</li>
2526
</ul>
2627
</li>
28+
2729
</ul>
2830

2931
<p>Return <code>true</code> if you can get such expression that evaluates to <code>24</code>, and <code>false</code> otherwise.</p>

solution/0600-0699/0682.Baseball Game/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ul>
1212
<li>An integer <code>x</code>.
13+
1314
<ul>
1415
<li>Record a new score of <code>x</code>.</li>
1516
</ul>
@@ -29,6 +30,7 @@
2930
<li>Invalidate the previous score, removing it from the record.</li>
3031
</ul>
3132
</li>
33+
3234
</ul>
3335

3436
<p>Return <em>the sum of all the scores on the record after applying all the operations</em>.</p>

solution/0700-0799/0753.Cracking the Safe/README_EN.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
<ul>
1212
<li>For example, the correct password is <code>&quot;345&quot;</code> and you enter in <code>&quot;012345&quot;</code>:
13+
1314
<ul>
1415
<li>After typing <code>0</code>, the most recent <code>3</code> digits is <code>&quot;0&quot;</code>, which is incorrect.</li>
1516
<li>After typing <code>1</code>, the most recent <code>3</code> digits is <code>&quot;01&quot;</code>, which is incorrect.</li>
@@ -19,6 +20,7 @@
1920
<li>After typing <code>5</code>, the most recent <code>3</code> digits is <code>&quot;345&quot;</code>, which is correct and the safe unlocks.</li>
2021
</ul>
2122
</li>
23+
2224
</ul>
2325

2426
<p>Return <em>any string of <strong>minimum length</strong> that will unlock the safe <strong>at some point</strong> of entering it</em>.</p>
@@ -42,7 +44,7 @@
4244
- &quot;01&quot; is typed in starting from the 1<sup>st</sup> digit.
4345
- &quot;10&quot; is typed in starting from the 3<sup>rd</sup> digit.
4446
- &quot;11&quot; is typed in starting from the 2<sup>nd</sup> digit.
45-
Thus &quot;01100&quot; will unlock the safe. &quot;01100&quot;, &quot;10011&quot;, and &quot;11001&quot; would also unlock the safe.
47+
Thus &quot;01100&quot; will unlock the safe. &quot;10011&quot;, and &quot;11001&quot; would also unlock the safe.
4648
</pre>
4749

4850
<p>&nbsp;</p>

0 commit comments

Comments
 (0)