Skip to content

Commit be22de5

Browse files
committed
chore: update lc problems
1 parent d6e50f1 commit be22de5

File tree

136 files changed

+929
-1393
lines changed

Some content is hidden

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

136 files changed

+929
-1393
lines changed

solution/0000-0099/0064.Minimum Path Sum/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,36 @@
66

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

9-
<p>给定一个包含非负整数的 <code><em>m</em> x <em>n</em></code> 网格 <code>grid</code> ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。</p>
9+
<p>给定一个包含非负整数的 <code><em>m</em>&nbsp;x&nbsp;<em>n</em></code>&nbsp;网格&nbsp;<code>grid</code> ,请找出一条从左上角到右下角的路径,使得路径上的数字总和为最小。</p>
1010

1111
<p><strong>说明:</strong>每次只能向下或者向右移动一步。</p>
1212

13-
<p> </p>
13+
<p>&nbsp;</p>
1414

15-
<p><strong>示例 1:</strong></p>
15+
<p><strong class="example">示例 1:</strong></p>
1616
<img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/0000-0099/0064.Minimum%20Path%20Sum/images/minpath.jpg" style="width: 242px; height: 242px;" />
1717
<pre>
1818
<strong>输入:</strong>grid = [[1,3,1],[1,5,1],[4,2,1]]
1919
<strong>输出:</strong>7
2020
<strong>解释:</strong>因为路径 1→3→1→1→1 的总和最小。
2121
</pre>
2222

23-
<p><strong>示例 2:</strong></p>
23+
<p><strong class="example">示例 2:</strong></p>
2424

2525
<pre>
2626
<strong>输入:</strong>grid = [[1,2,3],[4,5,6]]
2727
<strong>输出:</strong>12
2828
</pre>
2929

30-
<p> </p>
30+
<p>&nbsp;</p>
3131

3232
<p><strong>提示:</strong></p>
3333

3434
<ul>
3535
<li><code>m == grid.length</code></li>
3636
<li><code>n == grid[i].length</code></li>
37-
<li><code>1 <= m, n <= 200</code></li>
38-
<li><code>0 <= grid[i][j] <= 100</code></li>
37+
<li><code>1 &lt;= m, n &lt;= 200</code></li>
38+
<li><code>0 &lt;= grid[i][j] &lt;= 200</code></li>
3939
</ul>
4040

4141
## 解法

solution/0000-0099/0064.Minimum Path Sum/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<li><code>m == grid.length</code></li>
3232
<li><code>n == grid[i].length</code></li>
3333
<li><code>1 &lt;= m, n &lt;= 200</code></li>
34-
<li><code>0 &lt;= grid[i][j] &lt;= 100</code></li>
34+
<li><code>0 &lt;= grid[i][j] &lt;= 200</code></li>
3535
</ul>
3636

3737
## Solutions

solution/0100-0199/0195.Tenth Line/README_EN.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,26 @@
1111
<p>Assume that <code>file.txt</code> has the following content:</p>
1212

1313
<pre>
14-
1514
Line 1
16-
1715
Line 2
18-
1916
Line 3
20-
2117
Line 4
22-
2318
Line 5
24-
2519
Line 6
26-
2720
Line 7
28-
2921
Line 8
30-
3122
Line 9
32-
3323
Line 10
34-
3524
</pre>
3625

3726
<p>Your script should output the tenth line, which is:</p>
3827

3928
<pre>
40-
4129
Line 10
42-
4330
</pre>
4431

4532
<div class="spoilers"><b>Note:</b><br />
46-
4733
1. If the file contains less than 10 lines, what should you output?<br />
48-
4934
2. There&#39;s at least three different solutions. Try to explore all possibilities.</div>
5035

5136
## Solutions

solution/0200-0299/0274.H-Index/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88

99
<p>给你一个整数数组 <code>citations</code> ,其中 <code>citations[i]</code> 表示研究者的第 <code>i</code> 篇论文被引用的次数。计算并返回该研究者的 <strong><code>h</code><em>&nbsp;</em>指数</strong>。</p>
1010

11-
<p>根据维基百科上&nbsp;<a href="https://baike.baidu.com/item/h-index/3991452?fr=aladdin" target="_blank">h 指数的定义</a>:h 代表“高引用次数”,一名科研人员的 <code>h</code><strong>指数</strong>是指他(她)的 (<code>n</code> 篇论文中)<strong>总共</strong>有 <code>h</code> 篇论文分别被引用了<strong>至少</strong> <code>h</code> 次。且其余的 <em><code>n - h</code>&nbsp;</em>篇论文每篇被引用次数&nbsp;<strong>不超过 </strong><em><code>h</code> </em>次。</p>
12-
13-
<p>如果 <code>h</code><em> </em>有多种可能的值,<strong><code>h</code> 指数 </strong>是其中最大的那个。</p>
11+
<p>根据维基百科上&nbsp;<a href="https://baike.baidu.com/item/h-index/3991452?fr=aladdin" target="_blank">h 指数的定义</a>:<code>h</code> 代表“高引用次数” ,一名科研人员的 <code>h</code><strong> 指数 </strong>是指他(她)至少发表了 <code>h</code> 篇论文,并且每篇论文<strong> 至少</strong> 被引用 <code>h</code> 次。如果 <code>h</code><em> </em>有多种可能的值,<strong><code>h</code> 指数 </strong>是其中最大的那个。</p>
1412

1513
<p>&nbsp;</p>
1614

solution/0300-0399/0327.Count of Range Sum/Solution.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
class BinaryIndexedTree {
22
public:
3-
BinaryIndexedTree(int _n) : n(_n), c(_n + 1) {}
3+
BinaryIndexedTree(int _n)
4+
: n(_n)
5+
, c(_n + 1) {}
46

57
void update(int x, int v) {
68
while (x <= n) {

solution/0300-0399/0328.Odd Even Linked List/Solution.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Solution {
1414
if (!head) {
1515
return nullptr;
1616
}
17-
ListNode *a = head;
17+
ListNode* a = head;
1818
ListNode *b = head->next, *c = b;
1919
while (b && b->next) {
2020
a->next = b->next;

solution/0300-0399/0329.Longest Increasing Path in a Matrix/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class Solution {
102102
this.matrix = matrix;
103103
int ans = 0;
104104
for (int i = 0; i < m; ++i) {
105-
for (int j = 0;j < n; ++j) {
105+
for (int j = 0; j < n; ++j) {
106106
ans = Math.max(ans, dfs(i, j));
107107
}
108108
}

solution/0300-0399/0329.Longest Increasing Path in a Matrix/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Solution {
8080
this.matrix = matrix;
8181
int ans = 0;
8282
for (int i = 0; i < m; ++i) {
83-
for (int j = 0;j < n; ++j) {
83+
for (int j = 0; j < n; ++j) {
8484
ans = Math.max(ans, dfs(i, j));
8585
}
8686
}

solution/0300-0399/0329.Longest Increasing Path in a Matrix/Solution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public int longestIncreasingPath(int[][] matrix) {
1111
this.matrix = matrix;
1212
int ans = 0;
1313
for (int i = 0; i < m; ++i) {
14-
for (int j = 0;j < n; ++j) {
14+
for (int j = 0; j < n; ++j) {
1515
ans = Math.max(ans, dfs(i, j));
1616
}
1717
}

solution/0300-0399/0336.Palindrome Pairs/README.md

Lines changed: 2 additions & 0 deletions
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>

0 commit comments

Comments
 (0)