Skip to content

Commit 9692656

Browse files
authored
feat: update lc problems (doocs#3569)
1 parent a0d4ef3 commit 9692656

File tree

11 files changed

+16
-15
lines changed

11 files changed

+16
-15
lines changed

solution/0300-0399/0314.Binary Tree Vertical Order Traversal/README.md

+5-6
Original file line numberDiff line numberDiff line change
@@ -28,25 +28,24 @@ tags:
2828
<p>&nbsp;</p>
2929

3030
<p><strong class="example">示例 1:</strong></p>
31-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/vtree1.jpg" style="width: 282px; height: 301px;" />
31+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/1727276130-UOKFsu-image.png" style="width: 400px; height: 273px;" />
3232
<pre>
3333
<strong>输入:</strong>root = [3,9,20,null,null,15,7]
3434
<strong>输出:</strong>[[9],[3,15],[20],[7]]
3535
</pre>
3636

3737
<p><strong class="example">示例 2:</strong></p>
38-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/vtree2-1.jpg" style="width: 462px; height: 222px;" />
38+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/1727276212-bzuKab-image.png" style="width: 400px; height: 253px;" />
3939
<pre>
4040
<strong>输入:</strong>root = [3,9,8,4,0,1,7]
4141
<strong>输出:</strong>[[4],[9],[3,0,1],[8],[7]]
4242
</pre>
4343

4444
<p><strong class="example">示例 3:</strong></p>
45-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/vtree2.jpg" style="width: 462px; height: 302px;" />
45+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0300-0399/0314.Binary%20Tree%20Vertical%20Order%20Traversal/images/1727276242-EGdtNz-image.png" style="width: 400px; height: 391px;" />
4646
<pre>
47-
<strong>输入:</strong>root = [3,9,8,4,0,1,7,null,null,null,2,5]
48-
<strong>输出:</strong>[[4],[9,5],[3,0,1],[8,2],[7]]
49-
</pre>
47+
<strong>输入:</strong>root = [1,2,3,4,10,9,11,null,5,null,null,null,null,null,null,null,6]
48+
<strong>输出:</strong>[[4],[2,5],[1,10,9,6],[3],[11]]</pre>
5049

5150
<p>&nbsp;</p>
5251

Binary file not shown.
Binary file not shown.

solution/2200-2299/2286.Booking Concert Tickets in Groups/README_EN.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ tags:
5454
[null, [0, 0], [], true, false]
5555

5656
<strong>Explanation</strong>
57-
BookMyShow bms = new BookMyShow(2, 5); // There are 2 rows with 5 seats each
57+
BookMyShow bms = new BookMyShow(2, 5); // There are 2 rows with 5 seats each
5858
bms.gather(4, 0); // return [0, 0]
59-
// The group books seats [0, 3] of row 0.
59+
// The group books seats [0, 3] of row 0.
6060
bms.gather(2, 0); // return []
6161
// There is only 1 seat left in row 0,
62-
// so it is not possible to book 2 consecutive seats.
62+
// so it is not possible to book 2 consecutive seats.
6363
bms.scatter(5, 1); // return True
64-
// The group books seat 4 of row 0 and seats [0, 3] of row 1.
64+
// The group books seat 4 of row 0 and seats [0, 3] of row 1.
6565
bms.scatter(5, 1); // return False
6666
// There is only one seat left in the hall.
6767
</pre>

solution/2400-2499/2416.Sum of Prefix Scores of Strings/README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tags:
2323

2424
<p>给你一个长度为 <code>n</code> 的数组 <code>words</code> ,该数组由 <strong>非空</strong> 字符串组成。</p>
2525

26-
<p>定义字符串 <code>word</code> 的 <strong>分数</strong> 等于以 <code>word</code> 作为 <strong>前缀</strong> 的 <code>words[i]</code> 的数目。</p>
26+
<p>定义字符串 <code>term</code> 的 <strong>分数</strong> 等于以 <code>term</code> 作为 <strong>前缀</strong> 的 <code>words[i]</code> 的数目。</p>
2727

2828
<ul>
2929
<li>例如,如果 <code>words = ["a", "ab", "abc", "cab"]</code> ,那么 <code>"ab"</code> 的分数是 <code>2</code> ,因为 <code>"ab"</code> 是 <code>"ab"</code> 和 <code>"abc"</code> 的一个前缀。</li>
@@ -37,7 +37,8 @@ tags:
3737

3838
<p><strong>示例 1:</strong></p>
3939

40-
<pre><strong>输入:</strong>words = ["abc","ab","bc","b"]
40+
<pre>
41+
<strong>输入:</strong>words = ["abc","ab","bc","b"]
4142
<strong>输出:</strong>[5,4,3,2]
4243
<strong>解释:</strong>对应每个字符串的答案如下:
4344
- "abc" 有 3 个前缀:"a"、"ab" 和 "abc" 。
@@ -56,7 +57,8 @@ tags:
5657

5758
<p><strong>示例 2:</strong></p>
5859

59-
<pre><strong>输入:</strong>words = ["abcd"]
60+
<pre>
61+
<strong>输入:</strong>words = ["abcd"]
6062
<strong>输出:</strong>[4]
6163
<strong>解释:</strong>
6264
"abcd" 有 4 个前缀 "a"、"ab"、"abc" 和 "abcd"。

solution/2400-2499/2416.Sum of Prefix Scores of Strings/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ tags:
2323

2424
<p>You are given an array <code>words</code> of size <code>n</code> consisting of <strong>non-empty</strong> strings.</p>
2525

26-
<p>We define the <strong>score</strong> of a string <code>word</code> as the <strong>number</strong> of strings <code>words[i]</code> such that <code>word</code> is a <strong>prefix</strong> of <code>words[i]</code>.</p>
26+
<p>We define the <strong>score</strong> of a string <code>term</code> as the <strong>number</strong> of strings <code>words[i]</code> such that <code>term</code> is a <strong>prefix</strong> of <code>words[i]</code>.</p>
2727

2828
<ul>
2929
<li>For example, if <code>words = [&quot;a&quot;, &quot;ab&quot;, &quot;abc&quot;, &quot;cab&quot;]</code>, then the score of <code>&quot;ab&quot;</code> is <code>2</code>, since <code>&quot;ab&quot;</code> is a prefix of both <code>&quot;ab&quot;</code> and <code>&quot;abc&quot;</code>.</li>

solution/2500-2599/2535.Difference Between Element Sum and Digit Sum of an Array/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ tags:
3636
<pre>
3737
<strong>Input:</strong> nums = [1,15,6,3]
3838
<strong>Output:</strong> 9
39-
<strong>Explanation:</strong>
39+
<strong>Explanation:</strong>
4040
The element sum of nums is 1 + 15 + 6 + 3 = 25.
4141
The digit sum of nums is 1 + 1 + 5 + 6 + 3 = 16.
4242
The absolute difference between the element sum and digit sum is |25 - 16| = 9.

0 commit comments

Comments
 (0)