Skip to content

Commit c01ef19

Browse files
committed
chore: update lc problems
1 parent 718bb40 commit c01ef19

File tree

46 files changed

+704
-385
lines changed

Some content is hidden

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

46 files changed

+704
-385
lines changed

lcof2/剑指 Offer II 098. 路径的数目/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ class Solution {
254254
func uniquePaths(_ m: Int, _ n: Int) -> Int {
255255
var dp = Array(repeating: Array(repeating: 0, count: n), count: m)
256256
dp[0][0] = 1
257-
257+
258258
for i in 0..<m {
259259
for j in 0..<n {
260260
if i > 0 {
@@ -265,7 +265,7 @@ class Solution {
265265
}
266266
}
267267
}
268-
268+
269269
return dp[m - 1][n - 1]
270270
}
271271
}

lcof2/剑指 Offer II 099. 最小路径之和/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,17 @@ class Solution {
214214
for i in 1..<m {
215215
dp[i][0] += dp[i-1][0]
216216
}
217-
217+
218218
for j in 1..<n {
219219
dp[0][j] += dp[0][j-1]
220220
}
221-
221+
222222
for i in 1..<m {
223223
for j in 1..<n {
224224
dp[i][j] += min(dp[i-1][j], dp[i][j-1])
225225
}
226226
}
227-
227+
228228
return dp[m-1][n-1]
229229
}
230230
}

solution/1000-1099/1028.Recover a Tree From Preorder Traversal/README_EN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,21 @@ tags:
3131

3232
<p>&nbsp;</p>
3333
<p><strong class="example">Example 1:</strong></p>
34-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/recover-a-tree-from-preorder-traversal.png" style="width: 320px; height: 200px;" />
34+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/recover_tree_ex1.png" style="width: 423px; height: 200px;" />
3535
<pre>
3636
<strong>Input:</strong> traversal = &quot;1-2--3--4-5--6--7&quot;
3737
<strong>Output:</strong> [1,2,5,3,4,6,7]
3838
</pre>
3939

4040
<p><strong class="example">Example 2:</strong></p>
41-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/screen-shot-2019-04-10-at-114101-pm.png" style="width: 256px; height: 250px;" />
41+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/recover_tree_ex2.png" style="width: 432px; height: 250px;" />
4242
<pre>
4343
<strong>Input:</strong> traversal = &quot;1-2--3---4-5--6---7&quot;
4444
<strong>Output:</strong> [1,2,5,3,null,6,null,4,null,7]
4545
</pre>
4646

4747
<p><strong class="example">Example 3:</strong></p>
48-
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/screen-shot-2019-04-10-at-114955-pm.png" style="width: 276px; height: 250px;" />
48+
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1000-1099/1028.Recover%20a%20Tree%20From%20Preorder%20Traversal/images/recover_tree_ex3.png" style="width: 305px; height: 250px;" />
4949
<pre>
5050
<strong>Input:</strong> traversal = &quot;1-401--349---90--88&quot;
5151
<strong>Output:</strong> [1,401,null,349,88,90]
23.8 KB
Loading
27.3 KB
Loading
22.3 KB
Loading

solution/1200-1299/1282.Group the People Given the Group Size They Belong To/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/1200-1299/1282.Gr
55
rating: 1267
66
source: 第 166 场周赛 Q2
77
tags:
8+
- 贪心
89
- 数组
910
- 哈希表
1011
---

solution/1200-1299/1282.Group the People Given the Group Size They Belong To/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/1200-1299/1282.Gr
55
rating: 1267
66
source: Weekly Contest 166 Q2
77
tags:
8+
- Greedy
89
- Array
910
- Hash Table
1011
---

0 commit comments

Comments
 (0)