Skip to content

Commit 4710a05

Browse files
committed
feat: update lc problems
1 parent 2bc0266 commit 4710a05

File tree

48 files changed

+249
-231
lines changed

Some content is hidden

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

48 files changed

+249
-231
lines changed

solution/0000-0099/0015.3Sum/README_EN.md

+26-7
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,39 @@
1010

1111
<p>&nbsp;</p>
1212
<p><strong>Example 1:</strong></p>
13-
<pre><strong>Input:</strong> nums = [-1,0,1,2,-1,-4]
13+
14+
<pre>
15+
<strong>Input:</strong> nums = [-1,0,1,2,-1,-4]
1416
<strong>Output:</strong> [[-1,-1,2],[-1,0,1]]
15-
</pre><p><strong>Example 2:</strong></p>
16-
<pre><strong>Input:</strong> nums = []
17-
<strong>Output:</strong> []
18-
</pre><p><strong>Example 3:</strong></p>
19-
<pre><strong>Input:</strong> nums = [0]
17+
<strong>Explanation:</strong>
18+
nums[0] + nums[1] + nums[1] = (-1) + 0 + 1 = 0.
19+
nums[1] + nums[2] + nums[4] = 0 + 1 + (-1) = 0.
20+
nums[0] + nums[3] + nums[4] = (-1) + 2 + (-1) = 0.
21+
The distinct triplets are [-1,0,1] and [-1,-1,2].
22+
Notice that the order of the output and the order of the triplets does not matter.
23+
</pre>
24+
25+
<p><strong>Example 2:</strong></p>
26+
27+
<pre>
28+
<strong>Input:</strong> nums = [0,1,1]
2029
<strong>Output:</strong> []
30+
<strong>Explanation:</strong> The only possible triplet does not sum up to 0.
2131
</pre>
32+
33+
<p><strong>Example 3:</strong></p>
34+
35+
<pre>
36+
<strong>Input:</strong> nums = [0,0,0]
37+
<strong>Output:</strong> [[0,0,0]]
38+
<strong>Explanation:</strong> The only possible triplet sums up to 0.
39+
</pre>
40+
2241
<p>&nbsp;</p>
2342
<p><strong>Constraints:</strong></p>
2443

2544
<ul>
26-
<li><code>0 &lt;= nums.length &lt;= 3000</code></li>
45+
<li><code>3 &lt;= nums.length &lt;= 3000</code></li>
2746
<li><code>-10<sup>5</sup> &lt;= nums[i] &lt;= 10<sup>5</sup></code></li>
2847
</ul>
2948

solution/0100-0199/0155.Min Stack/README_EN.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
<li><code>int getMin()</code> retrieves the minimum element in the stack.</li>
1717
</ul>
1818

19+
<p>You must implement a solution with <code>O(1)</code> time complexity for each function.</p>
20+
1921
<p>&nbsp;</p>
2022
<p><strong>Example 1:</strong></p>
2123

solution/0100-0199/0162.Find Peak Element/README_EN.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
<p>A peak element is an element that is strictly greater than its neighbors.</p>
88

9-
<p>Given an integer array <code>nums</code>, find a peak element, and return its index. If&nbsp;the array contains multiple peaks, return the index to <strong>any of the peaks</strong>.</p>
9+
<p>Given a <strong>0-indexed</strong> integer array <code>nums</code>, find a peak element, and return its index. If the array contains multiple peaks, return the index to <strong>any of the peaks</strong>.</p>
1010

11-
<p>You may imagine that <code>nums[-1] = nums[n] = -&infin;</code>.</p>
11+
<p>You may imagine that <code>nums[-1] = nums[n] = -&infin;</code>. In other words, an element is always considered to be strictly greater than a neighbor that is outside the array.</p>
1212

13-
<p>You must write an algorithm that runs in&nbsp;<code>O(log n)</code> time.</p>
13+
<p>You must write an algorithm that runs in <code>O(log n)</code> time.</p>
1414

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

solution/0200-0299/0223.Rectangle Area/README_EN.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
<p><strong>Constraints:</strong></p>
3030

3131
<ul>
32-
<li><code>-10<sup>4</sup> &lt;= ax1, ay1, ax2, ay2, bx1, by1, bx2, by2 &lt;= 10<sup>4</sup></code></li>
32+
<li><code>-10<sup>4</sup> &lt;= ax1 &lt;= ax2 &lt;= 10<sup>4</sup></code></li>
33+
<li><code>-10<sup>4</sup> &lt;= ay1 &lt;= ay2 &lt;= 10<sup>4</sup></code></li>
34+
<li><code>-10<sup>4</sup> &lt;= bx1 &lt;= bx2 &lt;= 10<sup>4</sup></code></li>
35+
<li><code>-10<sup>4</sup> &lt;= by1 &lt;= by2 &lt;= 10<sup>4</sup></code></li>
3336
</ul>
3437

3538
## Solutions

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/0336.Palindrome Pairs/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<strong>输出:</strong>[[0,1],[1,0]]
3333
</pre>
3434

35+
36+
3537
<p><strong>提示:</strong></p>
3638

3739
<ul>

solution/0500-0599/0554.Brick Wall/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
<strong>输出:</strong>3
2929
</pre>
3030

31+
32+
3133
<p><strong>提示:</strong></p>
3234

3335
<ul>

solution/0500-0599/0560.Subarray Sum Equals K/README.md

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

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

9-
<p>给你一个整数数组 <code>nums</code> 和一个整数&nbsp;<code>k</code> ,请你统计并返回 <em>该数组中和为&nbsp;<code>k</code><strong>&nbsp;</strong>的子数组的个数&nbsp;</em>。</p>
9+
<p>给你一个整数数组 <code>nums</code> 和一个整数&nbsp;<code>k</code> ,请你统计并返回 <em>该数组中和为&nbsp;<code>k</code><strong>&nbsp;</strong>的连续子数组的个数&nbsp;</em>。</p>
1010

1111
<p>&nbsp;</p>
1212

solution/0500-0599/0561.Array Partition/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
<li><code>-10<sup>4</sup> &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
4242
</ul>
4343

44-
4544
## 解法
4645

4746
<!-- 这里可写通用的实现逻辑 -->

solution/0500-0599/0561.Array Partition/README_EN.md

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ So the maximum possible sum is 4.</pre>
3535
<li><code>-10<sup>4</sup> &lt;= nums[i] &lt;= 10<sup>4</sup></code></li>
3636
</ul>
3737

38-
3938
## Solutions
4039

4140
<!-- tabs:start -->

solution/0600-0699/0655.Print Binary Tree/README.md

+34-45
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,51 @@
66

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

9-
<p>在一个 m*n 的二维字符串数组中输出二叉树,并遵守以下规则:</p>
9+
<p>给你一棵二叉树的根节点 <code>root</code> ,请你构造一个下标从 <strong>0</strong> 开始、大小为 <code>m x n</code> 的字符串矩阵 <code>res</code> ,用以表示树的 <strong>格式化布局</strong> 。构造此格式化布局矩阵需要遵循以下规则:</p>
1010

11-
<ol>
12-
<li>行数&nbsp;<code>m</code>&nbsp;应当等于给定二叉树的高度。</li>
13-
<li>列数&nbsp;<code>n</code>&nbsp;应当总是奇数。</li>
14-
<li>根节点的值(以字符串格式给出)应当放在可放置的第一行正中间。根节点所在的行与列会将剩余空间划分为两部分(<strong>左下部分和右下部分</strong>)。你应该将左子树输出在左下部分,右子树输出在右下部分。左下和右下部分应当有相同的大小。即使一个子树为空而另一个非空,你不需要为空的子树输出任何东西,但仍需要为另一个子树留出足够的空间。然而,如果两个子树都为空则不需要为它们留出任何空间。</li>
15-
<li>每个未使用的空间应包含一个空的字符串<code>&quot;&quot;</code>。</li>
16-
<li>使用相同的规则输出子树。</li>
17-
</ol>
11+
<ul>
12+
<li>树的 <strong>高度</strong> 为 <code>height</code> ,矩阵的行数 <code>m</code> 应该等于 <code>height + 1</code> 。</li>
13+
<li>矩阵的列数 <code>n</code> 应该等于 <code>2<sup>height+1</sup> - 1</code> 。</li>
14+
<li><strong>根节点</strong> 需要放置在 <strong>顶行</strong> 的 <strong>正中间</strong> ,对应位置为 <code>res[0][(n-1)/2]</code> 。</li>
15+
<li>对于放置在矩阵中的每个节点,设对应位置为 <code>res[r][c]</code> ,将其左子节点放置在 <code>res[r+1][c-2<sup>height-r-1</sup>]</code> ,右子节点放置在 <code>res[r+1][c+2<sup>height-r-1</sup>]</code> 。</li>
16+
<li>继续这一过程,直到树中的所有节点都妥善放置。</li>
17+
<li>任意空单元格都应该包含空字符串 <code>""</code> 。</li>
18+
</ul>
1819

19-
<p><strong>示例 1:</strong></p>
20+
<p>返回构造得到的矩阵<em> </em><code>res</code> 。</p>
2021

21-
<pre>
22-
<strong>输入:</strong>
23-
1
24-
/
25-
2
26-
<strong>输出:</strong>
27-
[[&quot;&quot;, &quot;1&quot;, &quot;&quot;],
28-
[&quot;2&quot;, &quot;&quot;, &quot;&quot;]]
29-
</pre>
22+
<p>&nbsp;</p>
3023

31-
<p><strong>示例 2:</strong></p>
24+
<p>&nbsp;</p>
3225

26+
<p><strong>示例 1:</strong></p>
27+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0600-0699/0655.Print%20Binary%20Tree/images/print1-tree.jpg" style="width: 141px; height: 181px;" />
3328
<pre>
34-
<strong>输入:</strong>
35-
1
36-
/ \
37-
2 3
38-
\
39-
4
40-
<strong>输出:</strong>
41-
[[&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;1&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;],
42-
[&quot;&quot;, &quot;2&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;3&quot;, &quot;&quot;],
43-
[&quot;&quot;, &quot;&quot;, &quot;4&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;]]
29+
<strong>输入:</strong>root = [1,2]
30+
<strong>输出:</strong>
31+
[["","1",""],
32+
&nbsp;["2","",""]]
4433
</pre>
4534

46-
<p><strong>示例 3:</strong></p>
47-
35+
<p><strong>示例 2:</strong></p>
36+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0600-0699/0655.Print%20Binary%20Tree/images/print2-tree.jpg" style="width: 207px; height: 302px;" />
4837
<pre>
49-
<strong>输入:</strong>
50-
1
51-
/ \
52-
2 5
53-
/
54-
3
55-
/
56-
4
57-
<strong>输出:</strong>
58-
[[&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;1&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;]
59-
[&quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;2&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;5&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;]
60-
[&quot;&quot;, &quot;3&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;]
61-
[&quot;4&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;]]
38+
<strong>输入:</strong>root = [1,2,3,null,4]
39+
<strong>输出:</strong>
40+
[["","","","1","","",""],
41+
&nbsp;["","2","","","","3",""],
42+
&nbsp;["","","4","","","",""]]
6243
</pre>
6344

64-
<p><strong>注意:</strong> 二叉树的高度在范围 [1, 10] 中。</p>
45+
<p>&nbsp;</p>
46+
47+
<p><strong>提示:</strong></p>
48+
49+
<ul>
50+
<li>树中节点数在范围 <code>[1, 2<sup>10</sup>]</code> 内</li>
51+
<li><code>-99 &lt;= Node.val &lt;= 99</code></li>
52+
<li>树的深度在范围 <code>[1, 10]</code> 内</li>
53+
</ul>
6554

6655
## 解法
6756

solution/0600-0699/0692.Top K Frequent Words/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Note that &quot;i&quot; comes before &quot;love&quot; due to a lower alphabetica
3131

3232
<ul>
3333
<li><code>1 &lt;= words.length &lt;= 500</code></li>
34-
<li><code>1 &lt;= words[i] &lt;= 10</code></li>
34+
<li><code>1 &lt;= words[i].length &lt;= 10</code></li>
3535
<li><code>words[i]</code> consists of lowercase English letters.</li>
3636
<li><code>k</code> is in the range <code>[1, The number of <strong>unique</strong> words[i]]</code></li>
3737
</ul>

solution/0700-0799/0716.Max Stack/README_EN.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
<li><code>int popMax()</code> Retrieves the maximum element in the stack and removes it. If there is more than one maximum element, only remove the <strong>top-most</strong> one.</li>
1818
</ul>
1919

20+
<p>You must come up with a solution that supports <code>O(1)</code> for each <code>top</code> call and <code>O(logn)</code> for each other call?&nbsp;</p>
21+
2022
<p>&nbsp;</p>
2123
<p><strong>Example 1:</strong></p>
2224

@@ -49,9 +51,6 @@ stk.top(); // return 5, [<strong><u>5</u></strong>] the stack did not change
4951
<li>There will be <strong>at least one element</strong> in the stack when <code>pop</code>, <code>top</code>, <code>peekMax</code>, or <code>popMax</code> is called.</li>
5052
</ul>
5153

52-
<p>&nbsp;</p>
53-
<strong>Follow up:</strong> Could you come up with a solution that supports <code>O(1)</code> for each <code>top</code> call and <code>O(logn)</code> for each other call?&nbsp;
54-
5554
## Solutions
5655

5756
<!-- tabs:start -->

solution/0700-0799/0745.Prefix and Suffix Search/README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,34 @@
1212

1313
<ul>
1414
<li><code>WordFilter(string[] words)</code> 使用词典中的单词 <code>words</code> 初始化对象。</li>
15-
<li><code>f(string prefix, string suffix)</code> 返回词典中具有前缀 <code>prefix</code> 和后缀<code>suffix</code> 的单词的下标。如果存在不止一个满足要求的下标,返回其中 <strong>最大的下标</strong> 。如果不存在这样的单词,返回 <code>-1</code> 。</li>
15+
<li><code>f(string pref, string suff)</code> 返回词典中具有前缀&nbsp;<code>prefix</code>&nbsp;和后缀 <code>suff</code>&nbsp;的单词的下标。如果存在不止一个满足要求的下标,返回其中 <strong>最大的下标</strong> 。如果不存在这样的单词,返回 <code>-1</code> 。</li>
1616
</ul>
1717

18-
<p> </p>
18+
<p>&nbsp;</p>
1919

20-
<p><strong>示例</strong></p>
20+
<p><strong>示例</strong></p>
2121

2222
<pre>
23-
<strong>输入</strong>
23+
<strong>输入</strong>
2424
["WordFilter", "f"]
2525
[[["apple"]], ["a", "e"]]
26-
<strong>输出</strong>
26+
<strong>输出</strong>
2727
[null, 0]
28-
29-
<strong>解释:</strong>
28+
<strong>解释</strong>
3029
WordFilter wordFilter = new WordFilter(["apple"]);
31-
wordFilter.f("a", "e"); // 返回 0 ,因为下标为 0 的单词的 prefix = "a" 且 suffix = 'e" 。
30+
wordFilter.f("a", "e"); // 返回 0 ,因为下标为 0 的单词:前缀 prefix = "a" 且 后缀 suff = "e" 。
3231
</pre>
3332

33+
&nbsp;
34+
3435
<p><strong>提示:</strong></p>
3536

3637
<ul>
37-
<li><code>1 <= words.length <= 15000</code></li>
38-
<li><code>1 <= words[i].length <= 10</code></li>
39-
<li><code>1 <= prefix.length, suffix.length <= 10</code></li>
40-
<li><code>words[i]</code>、<code>prefix</code> 和 <code>suffix</code> 仅由小写英文字母组成</li>
41-
<li>最多对函数 <code>f</code> 进行 <code>15000</code> 次调用</li>
38+
<li><code>1 &lt;= words.length &lt;= 10<sup>4</sup></code></li>
39+
<li><code>1 &lt;= words[i].length &lt;= 7</code></li>
40+
<li><code>1 &lt;= pref.length, suff.length &lt;= 7</code></li>
41+
<li><code>words[i]</code>、<code>pref</code> 和 <code>suff</code> 仅由小写英文字母组成</li>
42+
<li>最多对函数 <code>f</code> 执行 <code>10<sup>4</sup></code> 次调用</li>
4243
</ul>
4344

4445
## 解法

solution/0700-0799/0747.Largest Number At Least Twice of Others/README_EN.md

+1-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,7 @@ The index of value 6 is 1, so we return 1.
2424
<pre>
2525
<strong>Input:</strong> nums = [1,2,3,4]
2626
<strong>Output:</strong> -1
27-
<strong>Explanation:</strong> 4 is less than twice the value of 3, so we return -1.</pre>
28-
29-
<p><strong>Example 3:</strong></p>
30-
31-
<pre>
32-
<strong>Input:</strong> nums = [1]
33-
<strong>Output:</strong> 0
34-
<strong>Explanation:</strong> 1 is trivially at least twice the value as any other number because there are no other numbers.
27+
<strong>Explanation:</strong> 4 is less than twice the value of 3, so we return -1.
3528
</pre>
3629

3730
<p>&nbsp;</p>

solution/0700-0799/0775.Global and Local Inversions/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
<strong>解释:</strong>有 2 个全局倒置,和 1 个局部倒置。
4343
</pre>
4444

45+
46+
4547
<p><strong>提示:</strong></p>
4648

4749
<ul>

solution/0800-0899/0802.Find Eventual Safe States/README_EN.md

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

77
<p>There is a directed graph of <code>n</code> nodes with each node labeled from <code>0</code> to <code>n - 1</code>. The graph is represented by a <strong>0-indexed</strong> 2D integer array <code>graph</code> where <code>graph[i]</code> is an integer array of nodes adjacent to node <code>i</code>, meaning there is an edge from node <code>i</code> to each node in <code>graph[i]</code>.</p>
88

9-
<p>A node is a <strong>terminal node</strong> if there are no outgoing edges. A node is a <strong>safe node</strong> if every possible path starting from that node leads to a <strong>terminal node</strong>.</p>
9+
<p>A node is a <strong>terminal node</strong> if there are no outgoing edges. A node is a <strong>safe node</strong> if every possible path starting from that node leads to a <strong>terminal node</strong> (or another safe node).</p>
1010

1111
<p>Return <em>an array containing all the <strong>safe nodes</strong> of the graph</em>. The answer should be sorted in <strong>ascending</strong> order.</p>
1212

solution/0800-0899/0828.Count Unique Characters of All Substrings of a Given String/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
<p>例如:<code>s = "LEETCODE"</code> ,则其中 <code>"L"</code>, <code>"T"</code>,<code>"C"</code>,<code>"O"</code>,<code>"D"</code> 都是唯一字符,因为它们只出现一次,所以 <code>countUniqueChars(s) = 5</code> 。</p>
1212

13-
<p>本题将会给你一个字符串 <code>s</code> ,我们需要返回 <code>countUniqueChars(t)</code> 的总和,其中 <code>t</code> 是 <code>s</code> 的子字符串。注意,某些子字符串可能是重复的,但你统计时也必须算上这些重复的子字符串(也就是说,你必须统计 <code>s</code> 的所有子字符串中的唯一字符)。</p>
13+
<p>本题将会给你一个字符串 <code>s</code> ,我们需要返回 <code>countUniqueChars(t)</code> 的总和,其中 <code>t</code> 是 <code>s</code> 的子字符串。输入用例保证返回值为&nbsp;32 位整数。</p>
1414

15-
<p>由于答案可能非常大,请将结果 <strong>mod 10 ^ 9 + 7</strong> 后再返回。</p>
15+
<p>注意,某些子字符串可能是重复的,但你统计时也必须算上这些重复的子字符串(也就是说,你必须统计 <code>s</code> 的所有子字符串中的唯一字符)。</p>
1616

1717
<p>&nbsp;</p>
1818

@@ -46,7 +46,7 @@
4646
<p><strong>提示:</strong></p>
4747

4848
<ul>
49-
<li><code>0 &lt;= s.length &lt;= 10^5</code></li>
49+
<li><code>1 &lt;= s.length &lt;= 10^5</code></li>
5050
<li><code>s</code> 只包含大写英文字符</li>
5151
</ul>
5252

solution/0800-0899/0828.Count Unique Characters of All Substrings of a Given String/README_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<li>For example, calling <code>countUniqueChars(s)</code> if <code>s = &quot;LEETCODE&quot;</code> then <code>&quot;L&quot;</code>, <code>&quot;T&quot;</code>, <code>&quot;C&quot;</code>, <code>&quot;O&quot;</code>, <code>&quot;D&quot;</code> are the unique characters since they appear only once in <code>s</code>, therefore <code>countUniqueChars(s) = 5</code>.</li>
1111
</ul>
1212

13-
<p>Given a string <code>s</code>, return the sum of <code>countUniqueChars(t)</code> where <code>t</code> is a substring of <code>s</code>.</p>
13+
<p>Given a string <code>s</code>, return the sum of <code>countUniqueChars(t)</code> where <code>t</code> is a substring of <code>s</code>. The test cases are generated such that the answer fits in a 32-bit integer.</p>
1414

1515
<p>Notice that some substrings can be repeated so in this case you have to count the repeated ones too.</p>
1616

solution/0800-0899/0830.Positions of Large Groups/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
<strong>输出:</strong>[]
4949
</pre>
5050

51+
52+
5153
<p><strong>提示:</strong></p>
5254

5355
<ul>

0 commit comments

Comments
 (0)