Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit a0edc60

Browse files
更新 编辑距离系列 排版格式修复
1 parent 9b0c0f2 commit a0edc60

File tree

4 files changed

+32
-29
lines changed

4 files changed

+32
-29
lines changed

‎problems/0072.编辑距离.md‎

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ exection -> execution (插入 'u')
4040
* 0 <= word1.length, word2.length <= 500
4141
* word1 和 word2 由小写英文字母组成
4242

43-
# 算法公开课
44-
**《代码随想录》算法视频公开课:[动态规划终极绝杀! LeetCode:72.编辑距离](https://www.bilibili.com/video/BV1we4y157wB/),相信结合视频再看本篇题解,更有助于大家对本题的理解**
43+
## 算法公开课
44+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划终极绝杀! LeetCode:72.编辑距离](https://www.bilibili.com/video/BV1we4y157wB/),相信结合视频再看本篇题解,更有助于大家对本题的理解**
4545

4646
## 思路
4747

@@ -227,8 +227,8 @@ public:
227227
228228
## 其他语言版本
229229
230+
### Java:
230231
231-
Java:
232232
```java
233233
public int minDistance(String word1, String word2) {
234234
int m = word1.length();
@@ -256,7 +256,8 @@ public int minDistance(String word1, String word2) {
256256
}
257257
```
258258

259-
Python:
259+
### Python:
260+
260261
```python
261262
class Solution:
262263
def minDistance(self, word1: str, word2: str) -> int:
@@ -274,7 +275,8 @@ class Solution:
274275
return dp[-1][-1]
275276
```
276277

277-
Go:
278+
### Go:
279+
278280
```Go
279281
func minDistance(word1 string, word2 string) int {
280282
m, n := len(word1), len(word2)
@@ -310,8 +312,8 @@ func Min(args ...int) int {
310312
}
311313
```
312314

315+
### Javascript:
313316

314-
Javascript:
315317
```javascript
316318
const minDistance = (word1, word2) => {
317319
let dp = Array.from(Array(word1.length + 1), () => Array(word2.length+1).fill(0));
@@ -338,7 +340,7 @@ const minDistance = (word1, word2) => {
338340
};
339341
```
340342

341-
TypeScript:
343+
### TypeScript:
342344

343345
```typescript
344346
function minDistance(word1: string, word2: string): number {
@@ -373,7 +375,7 @@ function minDistance(word1: string, word2: string): number {
373375
};
374376
```
375377

376-
C:
378+
### C:
377379

378380

379381
```c
@@ -405,3 +407,4 @@ int minDistance(char * word1, char * word2){
405407
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
406408
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
407409
</a>
410+

‎problems/0115.不同的子序列.md‎

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public:
157157
158158
## 其他语言版本
159159
160+
### Java:
160161
161-
Java:
162162
```java
163163
class Solution {
164164
public int numDistinct(String s, String t) {
@@ -182,7 +182,8 @@ class Solution {
182182
}
183183
```
184184

185-
Python:
185+
### Python:
186+
186187
```python
187188
class Solution:
188189
def numDistinct(self, s: str, t: str) -> int:
@@ -200,7 +201,8 @@ class Solution:
200201
return dp[-1][-1]
201202
```
202203

203-
Python3:
204+
### Python3:
205+
204206
```python
205207
class SolutionDP2:
206208
"""
@@ -234,7 +236,8 @@ class SolutionDP2:
234236
return dp[-1]
235237
```
236238

237-
Go:
239+
### Go:
240+
238241
```go
239242
func numDistinct(s string, t string) int {
240243
dp:= make([][]int,len(s)+1)
@@ -259,8 +262,8 @@ func numDistinct(s string, t string) int {
259262
}
260263
```
261264

265+
### Javascript:
262266

263-
Javascript:
264267
```javascript
265268
const numDistinct = (s, t) => {
266269
let dp = Array.from(Array(s.length + 1), () => Array(t.length +1).fill(0));
@@ -283,7 +286,7 @@ const numDistinct = (s, t) => {
283286
};
284287
```
285288

286-
TypeScript:
289+
### TypeScript:
287290

288291
```typescript
289292
function numDistinct(s: string, t: string): number {
@@ -312,9 +315,8 @@ function numDistinct(s: string, t: string): number {
312315
```
313316

314317

315-
316-
317318
<p align="center">
318319
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
319320
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
320321
</a>
322+

‎problems/0583.两个字符串的删除操作.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
* 解释: 第一步将"sea"变为"ea",第二步将"eat"变为"ea"
1818

1919

20-
# 算法公开课
20+
## 算法公开课
2121

22-
**《代码随想录》算法视频公开课:[动态规划之子序列,还是为了编辑距离做铺垫 | LeetCode:583.两个字符串的删除操(https://www.bilibili.com/video/BV1we4y157wB/),相信结合视频再看本篇题解,更有助于大家对本题的理解**。
22+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[LeetCode:583.两个字符串的删除操](https://www.bilibili.com/video/BV1we4y157wB/),相信结合视频再看本篇题解,更有助于大家对本题的理解**
2323

2424

2525
## 思路
@@ -143,8 +143,8 @@ public:
143143
144144
## 其他语言版本
145145
146+
### Java:
146147
147-
Java:
148148
```java
149149
// dp数组中存储word1和word2最长相同子序列的长度
150150
class Solution {
@@ -215,8 +215,8 @@ class Solution {
215215
}
216216
```
217217

218+
### Python:
218219

219-
Python:
220220
```python
221221
class Solution:
222222
def minDistance(self, word1: str, word2: str) -> int:
@@ -234,7 +234,8 @@ class Solution:
234234
return dp[-1][-1]
235235
```
236236

237-
Go:
237+
### Go:
238+
238239
```go
239240
func minDistance(word1 string, word2 string) int {
240241
dp := make([][]int, len(word1)+1)
@@ -267,7 +268,8 @@ func min(a, b int) int {
267268
return b
268269
}
269270
```
270-
Javascript:
271+
### Javascript:
272+
271273
```javascript
272274
// 方法一
273275
var minDistance = (word1, word2) => {
@@ -309,7 +311,7 @@ var minDistance = function (word1, word2) {
309311
};
310312
```
311313

312-
TypeScript:
314+
### TypeScript:
313315

314316
> dp版本一:
315317

‎problems/为了绝杀编辑距离,卡尔做了三步铺垫.md‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ else {
163163

164164
## 其他语言版本
165165

166+
### Java:
166167

167-
Java:
168168
```java
169169
class Solution {
170170
public int minDistance(String word1, String word2) {
@@ -193,15 +193,11 @@ class Solution {
193193
}
194194
```
195195

196-
Python:
197-
198-
199-
Go:
200-
201196

202197

203198

204199
<p align="center">
205200
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
206201
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
207202
</a>
203+

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /