Skip to content

Commit b098694

Browse files
authored
feat: update lc problems (#3438)
1 parent 547f88c commit b098694

File tree

51 files changed

+583
-116
lines changed

Some content is hidden

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

51 files changed

+583
-116
lines changed

solution/0100-0199/0147.Insertion Sort List/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ tags:
3131

3232
<p>对链表进行插入排序。</p>
3333

34-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/Insertion-sort-example-300px.gif" /></p>
34+
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/1724130387-qxfMwx-Insertion-sort-example-300px.gif" /></p>
3535

3636
<p>&nbsp;</p>
3737

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

40-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/sort1linked-list.jpg" /></p>
40+
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/1724130414-QbPAjl-image.png" /></p>
4141

4242
<pre>
4343
<strong>输入:</strong> head = [4,2,1,3]
4444
<strong>输出:</strong> [1,2,3,4]</pre>
4545

4646
<p><strong>示例&nbsp;2:</strong></p>
4747

48-
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/sort2linked-list.jpg" /></p>
48+
<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0100-0199/0147.Insertion%20Sort%20List/images/1724130432-zoOvdI-image.png" /></p>
4949

5050
<pre>
5151
<strong>输入:</strong> head = [-1,5,3,4,0]
Loading
Loading

solution/0200-0299/0208.Implement Trie (Prefix Tree)/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@ tags:
1919

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

22-
<p><strong><a href="https://baike.baidu.com/item/字典树/9825209?fr=aladdin" target="_blank">Trie</a></strong>(发音类似 "try")或者说 <strong>前缀树</strong> 是一种树形数据结构,用于高效地存储和检索字符串数据集中的键。这一数据结构有相当多的应用情景,例如自动补完和拼写检查。</p>
22+
<p><strong><a href="https://baike.baidu.com/item/字典树/9825209?fr=aladdin" target="_blank">Trie</a></strong>(发音类似 "try")或者说 <strong>前缀树</strong> 是一种树形数据结构,用于高效地存储和检索字符串数据集中的键。这一数据结构有相当多的应用情景,例如自动补全和拼写检查。</p>
2323

2424
<p>请你实现 Trie 类:</p>
2525

2626
<ul>
2727
<li><code>Trie()</code> 初始化前缀树对象。</li>
2828
<li><code>void insert(String word)</code> 向前缀树中插入字符串 <code>word</code> 。</li>
2929
<li><code>boolean search(String word)</code> 如果字符串 <code>word</code> 在前缀树中,返回 <code>true</code>(即,在检索之前已经插入);否则,返回 <code>false</code> 。</li>
30-
<li><code>boolean startsWith(String prefix)</code> 如果之前已经插入的字符串 <code>word</code> 的前缀之一为 <code>prefix</code> ,返回 <code>true</code> ;否则,返回 <code>false</code> 。</li>
30+
<li><code>boolean startsWith(String prefix)</code> 如果之前已经插入的字符串&nbsp;<code>word</code> 的前缀之一为 <code>prefix</code> ,返回 <code>true</code> ;否则,返回 <code>false</code> 。</li>
3131
</ul>
3232

33-
<p> </p>
33+
<p>&nbsp;</p>
3434

3535
<p><strong>示例:</strong></p>
3636

@@ -51,12 +51,12 @@ trie.insert("app");
5151
trie.search("app"); // 返回 True
5252
</pre>
5353

54-
<p> </p>
54+
<p>&nbsp;</p>
5555

5656
<p><strong>提示:</strong></p>
5757

5858
<ul>
59-
<li><code>1 <= word.length, prefix.length <= 2000</code></li>
59+
<li><code>1 &lt;= word.length, prefix.length &lt;= 2000</code></li>
6060
<li><code>word</code> 和 <code>prefix</code> 仅由小写英文字母组成</li>
6161
<li><code>insert</code>、<code>search</code> 和 <code>startsWith</code> 调用次数 <strong>总计</strong> 不超过 <code>3 * 10<sup>4</sup></code> 次</li>
6262
</ul>

solution/0300-0399/0379.Design Phone Directory/README.md

+29-33
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,47 @@ tags:
2020

2121
<!-- description:start -->
2222

23-
<p>设计一个电话目录管理系统,让它支持以下功能:</p>
23+
<p>设计一个电话目录管理系统,一开始有&nbsp;<code>maxNumbers</code>&nbsp;个位置能够储存号码。系统应该存储号码,检查某个位置是否为空,并清空给定的位置。</p>
2424

25-
<ol>
26-
<li><code>get</code>: 分配给用户一个未被使用的电话号码,获取失败请返回 -1</li>
27-
<li><code>check</code>: 检查指定的电话号码是否被使用</li>
28-
<li><code>release</code>: 释放掉一个电话号码,使其能够重新被分配</li>
29-
</ol>
25+
<p>实现&nbsp;<code>PhoneDirectory</code>&nbsp;类:</p>
3026

31-
<p>&nbsp;</p>
32-
33-
<p><strong>示例:</strong></p>
34-
35-
<pre>// 初始化电话目录,包括 3 个电话号码:0,1 和 2。
36-
PhoneDirectory directory = new PhoneDirectory(3);
37-
38-
// 可以返回任意未分配的号码,这里我们假设它返回 0。
39-
directory.get();
40-
41-
// 假设,函数返回 1。
42-
directory.get();
43-
44-
// 号码 2 未分配,所以返回为 true。
45-
directory.check(2);
46-
47-
// 返回 2,分配后,只剩一个号码未被分配。
48-
directory.get();
49-
50-
// 此时,号码 2 已经被分配,所以返回 false。
51-
directory.check(2);
27+
<ul>
28+
<li><code>PhoneDirectory(int maxNumbers)</code>&nbsp;电话目录初始有 <code>maxNumbers</code> 个可用位置。</li>
29+
<li><code>int get()</code> 提供一个未分配给任何人的号码。如果没有可用号码则返回&nbsp;<code>-1</code>。</li>
30+
<li><code>bool check(int number)</code>&nbsp;如果位置&nbsp;<code>number</code>&nbsp;可用返回 <code>true</code>&nbsp;否则返回&nbsp;<code>false</code>。</li>
31+
<li><code>void release(int number)</code> 回收或释放位置&nbsp;<code>number</code>。</li>
32+
</ul>
5233

53-
// 释放号码 2,将该号码变回未分配状态。
54-
directory.release(2);
34+
<p>&nbsp;</p>
5535

56-
// 号码 2 现在是未分配状态,所以返回 true。
57-
directory.check(2);
36+
<p><strong class="example">示例 1:</strong></p>
37+
38+
<pre>
39+
<strong>输入:</strong>
40+
["PhoneDirectory", "get", "get", "check", "get", "check", "release", "check"]
41+
[[3], [], [], [2], [], [2], [2], [2]]
42+
<strong>输出:</strong>
43+
[null, 0, 1, true, 2, false, null, true]
44+
45+
<strong>解释:</strong>
46+
PhoneDirectory phoneDirectory = new PhoneDirectory(3);
47+
phoneDirectory.get(); // 它可以返回任意可用的数字。这里我们假设它返回 0。
48+
phoneDirectory.get(); // 假设它返回 1。
49+
phoneDirectory.check(2); // 数字 2 可用,所以返回 true。
50+
phoneDirectory.get(); // 返回剩下的唯一一个数字 2。
51+
phoneDirectory.check(2); // 数字 2 不再可用,所以返回 false。
52+
phoneDirectory.release(2); // 将数字 2 释放回号码池。
53+
phoneDirectory.check(2); // 数字 2 重新可用,返回 true。
5854
</pre>
5955

6056
<p>&nbsp;</p>
6157

6258
<p><strong>提示:</strong></p>
6359

6460
<ul>
65-
<li><code>1 &lt;=&nbsp;maxNumbers &lt;= 10^4</code></li>
61+
<li><code>1 &lt;= maxNumbers &lt;= 10<sup>4</sup></code></li>
6662
<li><code>0 &lt;= number &lt; maxNumbers</code></li>
67-
<li>调用方法的总数处于区间 <code>[0 - 20000]</code> 之内</li>
63+
<li><code>get</code>,<code>check</code>&nbsp;和&nbsp;<code>release</code>&nbsp;最多被调用&nbsp;<code>2 * 10<sup>4</sup></code>&nbsp;次。</li>
6864
</ul>
6965

7066
<!-- description:end -->

solution/0300-0399/0391.Perfect Rectangle/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ tags:
5151
<ul>
5252
<li><code>1 &lt;= rectangles.length &lt;= 2 * 10<sup>4</sup></code></li>
5353
<li><code>rectangles[i].length == 4</code></li>
54-
<li><code>-10<sup>5</sup> &lt;= x<sub>i</sub>, y<sub>i</sub>, a<sub>i</sub>, b<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
54+
<li><code>-10<sup>5</sup> &lt;= x<sub>i</sub> &lt; a<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
55+
<li><code>-10<sup>5</sup> &lt;= y<sub>i</sub> &lt; b<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
5556
</ul>
5657

5758
<!-- description:end -->

solution/0300-0399/0391.Perfect Rectangle/README_EN.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ tags:
5252
<ul>
5353
<li><code>1 &lt;= rectangles.length &lt;= 2 * 10<sup>4</sup></code></li>
5454
<li><code>rectangles[i].length == 4</code></li>
55-
<li><code>-10<sup>5</sup> &lt;= x<sub>i</sub>, y<sub>i</sub>, a<sub>i</sub>, b<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
55+
<li><code>-10<sup>5</sup> &lt;= x<sub>i</sub> &lt; a<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
56+
<li><code>-10<sup>5</sup> &lt;= y<sub>i</sub> &lt; b<sub>i</sub> &lt;= 10<sup>5</sup></code></li>
5657
</ul>
5758

5859
<!-- description:end -->

solution/0600-0699/0616.Add Bold Tag in String/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Since now the four &lt;b&gt;&#39;s are consecutive, we merge them: &quot;&lt;b&g
6666
</ul>
6767

6868
<p>&nbsp;</p>
69-
<p><strong>Note:</strong> This question is the same as 758: <a href="https://leetcode.com/problems/bold-words-in-string/" target="_blank">https://leetcode.com/problems/bold-words-in-string/</a></p>
69+
<p><strong>Note:</strong> This question is the same as <a href="https://leetcode.com/problems/bold-words-in-string/description/" target="_blank">758. Bold Words in String</a>.</p>
7070

7171
<!-- description:end -->
7272

solution/0700-0799/0756.Pyramid Transition Matrix/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ tags:
2626
<li>例如,<code>"ABC"</code>&nbsp;表示一个三角形图案,其中一个 <code>“C”</code> 块堆叠在一个&nbsp;<code>'A'</code>&nbsp;块(左)和一个&nbsp;<code>'B'</code>&nbsp;块(右)之上。请注意,这与 <code>"BAC"</code>&nbsp;不同,<code>"B"</code>&nbsp;在左下角,<code>"A"</code>&nbsp;在右下角。</li>
2727
</ul>
2828

29-
<p>你从底部的一排积木&nbsp;<code>bottom</code>&nbsp;开始,作为一个单一的字符串,你 <strong>必须</strong> 使用作为金字塔的底部。</p>
29+
<p>你从作为单个字符串给出的底部的一排积木&nbsp;<code>bottom</code>&nbsp;开始,<strong>必须</strong>&nbsp;将其作为金字塔的底部。</p>
3030

31-
<p>在给定&nbsp;<code>bottom</code>&nbsp;&nbsp;<code>allowed</code>&nbsp;的情况下,如果你能一直构建到金字塔顶部,使金字塔中的 <strong>每个三角形图案</strong> 都是允许的,则返回 <code>true</code> ,否则返回 <code>false</code> 。</p>
31+
<p>在给定&nbsp;<code>bottom</code>&nbsp;&nbsp;<code>allowed</code>&nbsp;的情况下,如果你能一直构建到金字塔顶部,使金字塔中的 <strong>每个三角形图案</strong> 都是在&nbsp;<code>allowed</code>&nbsp;中的,则返回 <code>true</code> ,否则返回 <code>false</code> 。</p>
3232

3333
<p>&nbsp;</p>
3434

@@ -39,7 +39,7 @@ tags:
3939
<pre>
4040
<strong>输入:</strong>bottom = "BCD", allowed = ["BCC","CDE","CEA","FFF"]
4141
<strong>输出:</strong>true
42-
<strong>解释:</strong>允许的三角形模式显示在右边
42+
<strong>解释:</strong>允许的三角形图案显示在右边
4343
从最底层(第 3 层)开始,我们可以在第 2 层构建“CE”,然后在第 1 层构建“E”。
4444
金字塔中有三种三角形图案,分别是 “BCC”、“CDE” 和 “CEA”。都是允许的。
4545
</pre>
@@ -51,8 +51,8 @@ tags:
5151
<pre>
5252
<strong>输入:</strong>bottom = "AAAA", allowed = ["AAB","AAC","BCD","BBE","DEF"]
5353
<strong>输出:</strong>false
54-
<strong>解释:</strong>允许的三角形模式显示在右边
55-
从最底层(游戏邦注:即第 4 个关卡)开始,创造第 3 个关卡有多种方法,但如果尝试所有可能性,你便会在创造第 1 个关卡前陷入困境
54+
<strong>解释:</strong>允许的三角形图案显示在右边
55+
从最底层(即第 4 )开始,创造第 3 层有多种方法,但如果尝试所有可能性,你便会在创造第 1 层前陷入困境
5656
</pre>
5757

5858
<p>&nbsp;</p>

solution/0700-0799/0758.Bold Words in String/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ tags:
5151
</ul>
5252

5353
<p>&nbsp;</p>
54-
<p><strong>Note:</strong> This question is the same as 616: <a href="https://leetcode.com/problems/add-bold-tag-in-string/" target="_blank">https://leetcode.com/problems/add-bold-tag-in-string/</a></p>
54+
<p><strong>Note:</strong> This question is the same as <a href="https://leetcode.com/problems/add-bold-tag-in-string/description/" target="_blank">616. Add Bold Tag in String</a>.</p>
5555

5656
<!-- description:end -->
5757

solution/1300-1399/1380.Lucky Numbers in a Matrix/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tags:
1919

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

22-
<p>给你一个 <code>m * n</code> 的矩阵,矩阵中的数字 <strong>各不相同</strong> 。请你按 <strong>任意</strong> 顺序返回矩阵中的所有幸运数。</p>
22+
<p>给你一个 <code>m x&nbsp;n</code> 的矩阵,矩阵中的数字 <strong>各不相同</strong> 。请你按 <strong>任意</strong> 顺序返回矩阵中的所有幸运数。</p>
2323

2424
<p><strong>幸运数</strong> 是指矩阵中满足同时下列两个条件的元素:</p>
2525

@@ -30,28 +30,28 @@ tags:
3030

3131
<p>&nbsp;</p>
3232

33-
<p><strong>示例 1:</strong></p>
33+
<p><strong class="example">示例 1:</strong></p>
3434

3535
<pre>
3636
<strong>输入:</strong>matrix = [[3,7,8],[9,11,13],[15,16,17]]
3737
<strong>输出:</strong>[15]
3838
<strong>解释:</strong>15 是唯一的幸运数,因为它是其所在行中的最小值,也是所在列中的最大值。
3939
</pre>
4040

41-
<p><strong>示例 2:</strong></p>
41+
<p><strong class="example">示例 2:</strong></p>
4242

4343
<pre>
4444
<strong>输入:</strong>matrix = [[1,10,4,2],[9,3,8,7],[15,16,17,12]]
4545
<strong>输出:</strong>[12]
4646
<strong>解释:</strong>12 是唯一的幸运数,因为它是其所在行中的最小值,也是所在列中的最大值。
4747
</pre>
4848

49-
<p><strong>示例 3:</strong></p>
49+
<p><strong class="example">示例 3:</strong></p>
5050

5151
<pre>
5252
<strong>输入:</strong>matrix = [[7,8],[1,2]]
5353
<strong>输出:</strong>[7]
54-
<strong>解释:</strong>7是唯一的幸运数字,因为它是行中的最小值,列中的最大值。
54+
<strong>解释:</strong>7 是唯一的幸运数字,因为它是行中的最小值,列中的最大值。
5555
</pre>
5656

5757
<p>&nbsp;</p>
@@ -62,7 +62,7 @@ tags:
6262
<li><code>m == mat.length</code></li>
6363
<li><code>n == mat[i].length</code></li>
6464
<li><code>1 &lt;= n, m &lt;= 50</code></li>
65-
<li><code>1 &lt;=&nbsp;matrix[i][j]&nbsp;&lt;= 10^5</code></li>
65+
<li><code>1 &lt;=&nbsp;matrix[i][j]&nbsp;&lt;= 10<sup>5</sup></code></li>
6666
<li>矩阵中的所有元素都是不同的</li>
6767
</ul>
6868

solution/1900-1999/1937.Maximum Number of Points with Cost/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: 第 250 场周赛 Q3
77
tags:
88
- 数组
99
- 动态规划
10+
- 矩阵
1011
---
1112

1213
<!-- problem:start -->

solution/1900-1999/1937.Maximum Number of Points with Cost/README_EN.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: Weekly Contest 250 Q3
77
tags:
88
- Array
99
- Dynamic Programming
10+
- Matrix
1011
---
1112

1213
<!-- problem:start -->

solution/2100-2199/2122.Recover the Original Array/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: 第 273 场周赛 Q4
77
tags:
88
- 数组
99
- 哈希表
10+
- 双指针
1011
- 枚举
1112
- 排序
1213
---

solution/2100-2199/2122.Recover the Original Array/README_EN.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source: Weekly Contest 273 Q4
77
tags:
88
- Array
99
- Hash Table
10+
- Two Pointers
1011
- Enumeration
1112
- Sorting
1213
---

solution/2300-2399/2324.Product Sales Analysis IV/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ User 101:
9494
- Spent 7 * 15 = 105 on product 3.
9595
User 101 spent the most money on product 3.
9696
User 102:
97-
- Spent (9 + 7) * 10 = 150 on product 1.
97+
- Spent (9 + 6) * 10 = 150 on product 1.
9898
- Spent 6 * 25 = 150 on product 2.
9999
- Spent 10 * 15 = 150 on product 3.
100100
User 102 spent the most money on products 1, 2, and 3.

solution/2800-2899/2863.Maximum Length of Semi-Decreasing Subarrays/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/2800-2899/2863.Maximum%20Length%20of%20Semi-Decreasing%20Subarrays/README.md
55
tags:
6+
-
67
- 数组
7-
- 哈希表
88
- 排序
9+
- 单调栈
910
---
1011

1112
<!-- problem:start -->

solution/2800-2899/2863.Maximum Length of Semi-Decreasing Subarrays/README_EN.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/2800-2899/2863.Maximum%20Length%20of%20Semi-Decreasing%20Subarrays/README_EN.md
55
tags:
6+
- Stack
67
- Array
7-
- Hash Table
88
- Sorting
9+
- Monotonic Stack
910
---
1011

1112
<!-- problem:start -->

solution/2900-2999/2992.Number of Self-Divisible Permutations/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/2900-2999/2992.Number%20of%20Self-Divisible%20Permutations/README.md
55
tags:
66
- 位运算
7-
- 递归
87
- 数组
98
- 动态规划
9+
- 回溯
1010
- 状态压缩
1111
---
1212

solution/2900-2999/2992.Number of Self-Divisible Permutations/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/2900-2999/2992.Number%20of%20Self-Divisible%20Permutations/README_EN.md
55
tags:
66
- Bit Manipulation
7-
- Recursion
87
- Array
98
- Dynamic Programming
9+
- Backtracking
1010
- Bitmask
1111
---
1212

solution/3200-3299/3229.Minimum Operations to Make Array Equal to Target/README.md

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

2323
<p>给你两个长度相同的正整数数组 <code>nums</code> 和 <code>target</code>。</p>
2424

25-
<p>在一次操作中,你可以选择 <code>nums</code> 的任何<span data-keyword="subarray">子数组</span>,并将该子数组内的每个元素的值增加或减少 1。</p>
25+
<p>在一次操作中,你可以选择 <code>nums</code> 的任何子数组,并将该子数组内的每个元素的值增加或减少 1。</p>
2626

2727
<p>返回使 <code>nums</code> 数组变为 <code>target</code> 数组所需的 <strong>最少 </strong>操作次数。</p>
2828

solution/3200-3299/3247.Number of Subsequences with Odd Sum/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ tags:
5454
<p><strong>提示:</strong></p>
5555

5656
<ul>
57-
<li><code>1 &lt;= nums.lnegth &lt;= 10<sup>5</sup></code></li>
57+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
5858
<li><code>1 &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
5959
</ul>
6060

solution/3200-3299/3247.Number of Subsequences with Odd Sum/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ tags:
5252
<p><strong>Constraints:</strong></p>
5353

5454
<ul>
55-
<li><code>1 &lt;= nums.lnegth &lt;= 10<sup>5</sup></code></li>
55+
<li><code>1 &lt;= nums.length &lt;= 10<sup>5</sup></code></li>
5656
<li><code>1 &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>
5757
</ul>
5858

0 commit comments

Comments
 (0)