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 9b0c0f2

Browse files
更新 0392.判断子序列 0718.最长重复子数组 1035.不相交的线 1143.最长公共子序列 排版格式修复
1 parent 038d509 commit 9b0c0f2

File tree

4 files changed

+39
-31
lines changed

4 files changed

+39
-31
lines changed

‎problems/0392.判断子序列.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929
两个字符串都只由小写字符组成。
3030

31-
# 算法公开课
31+
## 算法公开课
3232

33-
**《代码随想录》算法视频公开课:[动态规划,用相似思路解决复杂问题 | LeetCode:392.判断子序列](https://www.bilibili.com/video/BV1tv4y1B7ym/),相信结合视频再看本篇题解,更有助于大家对本题的理解**
33+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划,用相似思路解决复杂问题 | LeetCode:392.判断子序列](https://www.bilibili.com/video/BV1tv4y1B7ym/),相信结合视频再看本篇题解,更有助于大家对本题的理解**
3434

3535

3636
## 思路
@@ -149,8 +149,8 @@ public:
149149

150150
## 其他语言版本
151151

152+
### Java:
152153

153-
Java:
154154
```java
155155
class Solution {
156156
public boolean isSubsequence(String s, String t) {
@@ -174,7 +174,8 @@ class Solution {
174174
}
175175
```
176176

177-
Python:
177+
### Python:
178+
178179
```python
179180
class Solution:
180181
def isSubsequence(self, s: str, t: str) -> bool:
@@ -190,7 +191,7 @@ class Solution:
190191
return False
191192
```
192193

193-
JavaScript:
194+
### JavaScript:
194195

195196
```javascript
196197
const isSubsequence = (s, t) => {
@@ -213,7 +214,7 @@ const isSubsequence = (s, t) => {
213214
};
214215
```
215216

216-
TypeScript:
217+
### TypeScript:
217218

218219
```typescript
219220
function isSubsequence(s: string, t: string): boolean {
@@ -237,7 +238,7 @@ function isSubsequence(s: string, t: string): boolean {
237238
};
238239
```
239240

240-
Go:
241+
### Go:
241242

242243
```go
243244
func isSubsequence(s string, t string) bool {
@@ -266,3 +267,4 @@ func isSubsequence(s string, t string) bool {
266267
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
267268
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
268269
</a>
270+

‎problems/0718.最长重复子数组.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
## 算法公开课
2727

28-
**《代码随想录》算法视频公开课:[动态规划之子序列问题,想清楚DP数组的定义 | LeetCode:718.最长重复子数组](https://www.bilibili.com/video/BV178411H7hV),相信结合视频再看本篇题解,更有助于大家对本题的理解**
29-
30-
28+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划之子序列问题,想清楚DP数组的定义 | LeetCode:718.最长重复子数组](https://www.bilibili.com/video/BV178411H7hV),相信结合视频再看本篇题解,更有助于大家对本题的理解**
3129

3230
## 思路
3331

@@ -126,7 +124,7 @@ public:
126124
* 时间复杂度:O(n ×ばつ m),n 为A长度,m为B长度
127125
* 空间复杂度:O(n ×ばつ m)
128126
129-
## 滚动数组
127+
### 滚动数组
130128
131129
在如下图中:
132130
@@ -257,8 +255,8 @@ class Solution {
257255

258256
## 其他语言版本
259257

258+
### Java:
260259

261-
Java:
262260
```java
263261
// 版本一
264262
class Solution {
@@ -300,7 +298,7 @@ class Solution {
300298
}
301299
```
302300

303-
Python:
301+
### Python:
304302

305303
2维DP
306304
```python
@@ -395,7 +393,8 @@ class Solution:
395393

396394

397395
```
398-
Go:
396+
### Go:
397+
399398
```Go
400399
func findLength(A []int, B []int) int {
401400
m, n := len(A), len(B)
@@ -442,7 +441,7 @@ func max(a, b int) int {
442441
}
443442
```
444443

445-
JavaScript:
444+
### JavaScript:
446445

447446
> 动态规划
448447

@@ -489,7 +488,7 @@ const findLength = (nums1, nums2) => {
489488
}
490489
```
491490

492-
TypeScript:
491+
### TypeScript:
493492

494493
> 动态规划:
495494
@@ -544,3 +543,4 @@ function findLength(nums1: number[], nums2: number[]): number {
544543
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
545544
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
546545
</a>
546+

‎problems/1035.不相交的线.md‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
## 算法公开课
2121

22-
**《代码随想录》算法视频公开课:[动态规划之子序列问题,换汤不换药 | LeetCode:1035.不相交的线](https://www.bilibili.com/video/BV1h84y1x7MP),相信结合视频再看本篇题解,更有助于大家对本题的理解**
22+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划之子序列问题,换汤不换药 | LeetCode:1035.不相交的线](https://www.bilibili.com/video/BV1h84y1x7MP),相信结合视频再看本篇题解,更有助于大家对本题的理解**
2323

2424

2525
## 思路
@@ -82,8 +82,8 @@ public:
8282
8383
## 其他语言版本
8484
85+
### Java:
8586
86-
Java:
8787
```java
8888
class Solution {
8989
public int maxUncrossedLines(int[] nums1, int[] nums2) {
@@ -106,7 +106,8 @@ Java:
106106
}
107107
```
108108

109-
Python:
109+
### Python:
110+
110111
```python
111112
class Solution:
112113
def maxUncrossedLines(self, A: List[int], B: List[int]) -> int:
@@ -120,8 +121,7 @@ class Solution:
120121
return dp[-1][-1]
121122
```
122123

123-
124-
Golang:
124+
### Go:
125125

126126
```go
127127
func maxUncrossedLines(A []int, B []int) int {
@@ -152,7 +152,7 @@ func max(a, b int) int {
152152
}
153153
```
154154

155-
Rust:
155+
### Rust:
156156

157157
```rust
158158
pub fn max_uncrossed_lines(nums1: Vec<i32>, nums2: Vec<i32>) -> i32 {
@@ -173,7 +173,7 @@ pub fn max_uncrossed_lines(nums1: Vec<i32>, nums2: Vec<i32>) -> i32 {
173173
}
174174
```
175175

176-
JavaScript:
176+
### JavaScript:
177177

178178
```javascript
179179
const maxUncrossedLines = (nums1, nums2) => {
@@ -196,7 +196,7 @@ const maxUncrossedLines = (nums1, nums2) => {
196196
};
197197
```
198198

199-
TypeScript:
199+
### TypeScript:
200200

201201
```typescript
202202
function maxUncrossedLines(nums1: number[], nums2: number[]): number {
@@ -224,3 +224,4 @@ function maxUncrossedLines(nums1: number[], nums2: number[]): number {
224224
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
225225
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
226226
</a>
227+

‎problems/1143.最长公共子序列.md‎

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
## 算法公开课
4141

42-
**《代码随想录》算法视频公开课:[动态规划子序列问题经典题目 | LeetCode:1143.最长公共子序列](https://www.bilibili.com/video/BV1ye4y1L7CQ),相信结合视频再看本篇题解,更有助于大家对本题的理解**
42+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划子序列问题经典题目 | LeetCode:1143.最长公共子序列](https://www.bilibili.com/video/BV1ye4y1L7CQ),相信结合视频再看本篇题解,更有助于大家对本题的理解**
4343

4444

4545
## 思路
@@ -136,7 +136,7 @@ public:
136136
137137
## 其他语言版本
138138
139-
Java:
139+
### Java:
140140
141141
```java
142142
/*
@@ -207,8 +207,9 @@ class Solution {
207207
}
208208
```
209209

210-
Python:
210+
### Python:
211211
2维DP
212+
212213
```python
213214
class Solution:
214215
def longestCommonSubsequence(self, text1: str, text2: str) -> int:
@@ -252,7 +253,8 @@ class Solution:
252253

253254
```
254255

255-
Go:
256+
### Go:
257+
256258
```Go
257259
func longestCommonSubsequence(text1 string, text2 string) int {
258260
t1 := len(text1)
@@ -283,7 +285,8 @@ func max(a,b int)int {
283285

284286
```
285287

286-
Javascript:
288+
### JavaScript:
289+
287290
```javascript
288291
const longestCommonSubsequence = (text1, text2) => {
289292
let dp = Array.from(Array(text1.length+1), () => Array(text2.length+1).fill(0));
@@ -302,7 +305,7 @@ const longestCommonSubsequence = (text1, text2) => {
302305
};
303306
```
304307

305-
TypeScript:
308+
### TypeScript:
306309

307310
```typescript
308311
function longestCommonSubsequence(text1: string, text2: string): number {
@@ -326,7 +329,8 @@ function longestCommonSubsequence(text1: string, text2: string): number {
326329
};
327330
```
328331

329-
Rust:
332+
### Rust:
333+
330334
```rust
331335
pub fn longest_common_subsequence(text1: String, text2: String) -> i32 {
332336
let (n, m) = (text1.len(), text2.len());
@@ -353,3 +357,4 @@ pub fn longest_common_subsequence(text1: String, text2: String) -> i32 {
353357
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
354358
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
355359
</a>
360+

0 commit comments

Comments
(0)

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