Skip to content

Commit c2b7232

Browse files
authored
feat: update lc problems (doocs#2654)
1 parent 72536f4 commit c2b7232

File tree

22 files changed

+40
-40
lines changed

22 files changed

+40
-40
lines changed

solution/0000-0099/0043.Multiply Strings/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,9 @@ class Solution {
288288
$product[$i + $j] += $carry;
289289
}
290290
}
291-
$result = implode("", $product);
291+
$result = implode('', $product);
292292
$result = ltrim($result, '0');
293-
return $result === "" ? "0" : $result;
293+
return $result === '' ? '0' : $result;
294294
}
295295
}
296296
```

solution/0000-0099/0043.Multiply Strings/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,9 @@ class Solution {
279279
$product[$i + $j] += $carry;
280280
}
281281
}
282-
$result = implode("", $product);
282+
$result = implode('', $product);
283283
$result = ltrim($result, '0');
284-
return $result === "" ? "0" : $result;
284+
return $result === '' ? '0' : $result;
285285
}
286286
}
287287
```

solution/0000-0099/0043.Multiply Strings/Solution.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ function multiply($num1, $num2) {
2222
$product[$i + $j] += $carry;
2323
}
2424
}
25-
$result = implode("", $product);
25+
$result = implode('', $product);
2626
$result = ltrim($result, '0');
27-
return $result === "" ? "0" : $result;
27+
return $result === '' ? '0' : $result;
2828
}
29-
}
29+
}

solution/0000-0099/0044.Wildcard Matching/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ class Solution {
411411
function isMatch($s, $p) {
412412
$lengthS = strlen($s);
413413
$lengthP = strlen($p);
414-
$dp = array();
414+
$dp = [];
415415
for ($i = 0; $i <= $lengthS; $i++) {
416416
$dp[$i] = array_fill(0, $lengthP + 1, false);
417417
}
@@ -426,7 +426,7 @@ class Solution {
426426
for ($j = 1; $j <= $lengthP; $j++) {
427427
if ($p[$j - 1] == '?' || $s[$i - 1] == $p[$j - 1]) {
428428
$dp[$i][$j] = $dp[$i - 1][$j - 1];
429-
} else if ($p[$j - 1] == '*') {
429+
} elseif ($p[$j - 1] == '*') {
430430
$dp[$i][$j] = $dp[$i][$j - 1] || $dp[$i - 1][$j];
431431
}
432432
}

solution/0000-0099/0044.Wildcard Matching/README_EN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ class Solution {
404404
function isMatch($s, $p) {
405405
$lengthS = strlen($s);
406406
$lengthP = strlen($p);
407-
$dp = array();
407+
$dp = [];
408408
for ($i = 0; $i <= $lengthS; $i++) {
409409
$dp[$i] = array_fill(0, $lengthP + 1, false);
410410
}
@@ -419,7 +419,7 @@ class Solution {
419419
for ($j = 1; $j <= $lengthP; $j++) {
420420
if ($p[$j - 1] == '?' || $s[$i - 1] == $p[$j - 1]) {
421421
$dp[$i][$j] = $dp[$i - 1][$j - 1];
422-
} else if ($p[$j - 1] == '*') {
422+
} elseif ($p[$j - 1] == '*') {
423423
$dp[$i][$j] = $dp[$i][$j - 1] || $dp[$i - 1][$j];
424424
}
425425
}

solution/0000-0099/0044.Wildcard Matching/Solution.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Solution {
88
function isMatch($s, $p) {
99
$lengthS = strlen($s);
1010
$lengthP = strlen($p);
11-
$dp = array();
11+
$dp = [];
1212
for ($i = 0; $i <= $lengthS; $i++) {
1313
$dp[$i] = array_fill(0, $lengthP + 1, false);
1414
}
@@ -23,11 +23,11 @@ function isMatch($s, $p) {
2323
for ($j = 1; $j <= $lengthP; $j++) {
2424
if ($p[$j - 1] == '?' || $s[$i - 1] == $p[$j - 1]) {
2525
$dp[$i][$j] = $dp[$i - 1][$j - 1];
26-
} else if ($p[$j - 1] == '*') {
26+
} elseif ($p[$j - 1] == '*') {
2727
$dp[$i][$j] = $dp[$i][$j - 1] || $dp[$i - 1][$j];
2828
}
2929
}
3030
}
3131
return $dp[$lengthS][$lengthP];
3232
}
33-
}
33+
}

solution/3100-3199/3119.Maximum Number of Potholes That Can Be Fixed/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English Version](/solution/3100-3199/3119.Maximum%20Number%20of%20Potholes%20That%20Can%20Be%20Fixed/README_EN.md)
44

5-
<!-- tags: -->
5+
<!-- tags:贪心,字符串,排序 -->
66

77
## 题目描述
88

solution/3100-3199/3119.Maximum Number of Potholes That Can Be Fixed/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[中文文档](/solution/3100-3199/3119.Maximum%20Number%20of%20Potholes%20That%20Can%20Be%20Fixed/README.md)
44

5-
<!-- tags: -->
5+
<!-- tags:Greedy,String,Sorting -->
66

77
## Description
88

solution/3100-3199/3120.Count the Number of Special Characters I/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[English Version](/solution/3100-3199/3120.Count%20the%20Number%20of%20Special%20Characters%20I/README_EN.md)
44

5-
<!-- tags: -->
5+
<!-- tags:哈希表,字符串 -->
66

77
## 题目描述
88

solution/3100-3199/3120.Count the Number of Special Characters I/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[中文文档](/solution/3100-3199/3120.Count%20the%20Number%20of%20Special%20Characters%20I/README.md)
44

5-
<!-- tags: -->
5+
<!-- tags:Hash Table,String -->
66

77
## Description
88

0 commit comments

Comments
 (0)