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 199827b

Browse files
Merge branch 'youngyangyang04:master' into master
2 parents 3933b49 + 4037eb6 commit 199827b

File tree

53 files changed

+605
-335
lines changed

Some content is hidden

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

53 files changed

+605
-335
lines changed

‎README.md‎

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
> 1. **介绍** :本项目是一套完整的刷题计划,旨在帮助大家少走弯路,循序渐进学算法,[关注作者](#关于作者)
66
> 2. **正式出版** :[《代码随想录》](https://programmercarl.com/other/publish.html)
77
> 3. **PDF版本** :[「代码随想录」算法精讲 PDF 版本](https://programmercarl.com/other/algo_pdf.html)
8-
> 4. **算法公开课** :[《代码随想录》算法视频公开课](https://www.bilibili.com/video/BV1fA4y1o715)
8+
> 4. **算法公开课** :[《代码随想录》算法视频公开课](https://www.programmercarl.com/other/gongkaike.html)
99
> 5. **最强八股文** :[代码随想录知识星球精华PDF](https://www.programmercarl.com/other/kstar_baguwen.html)
1010
> 6. **刷题顺序** :README已经将刷题顺序排好了,按照顺序一道一道刷就可以。
1111
> 7. **学习社区** :一起学习打卡/面试技巧/如何选择offer/大厂内推/职场规则/简历修改/技术分享/程序人生。欢迎加入[「代码随想录」知识星球](https://programmercarl.com/other/kstar.html)
12-
> 8. **提交代码** :本项目统一使用C++语言进行讲解,但已经有Java、Python、Go、JavaScript等等多语言版本,感谢[这里的每一位贡献者](https://github.com/youngyangyang04/leetcode-master/graphs/contributors),如果你也想贡献代码点亮你的头像,[点击这里](https://mp.weixin.qq.com/s/tqCxrMEU-ajQumL1i8im9A)了解提交代码的方式。
12+
> 8. **提交代码** :本项目统一使用C++语言进行讲解,但已经有Java、Python、Go、JavaScript等等多语言版本,感谢[这里的每一位贡献者](https://github.com/youngyangyang04/leetcode-master/graphs/contributors),如果你也想贡献代码点亮你的头像,[点击这里](https://www.programmercarl.com/qita/join.html)了解提交代码的方式。
1313
> 9. **转载须知** :以下所有文章皆为我([程序员Carl](https://github.com/youngyangyang04))的原创。引用本项目文章请注明出处,发现恶意抄袭或搬运,会动用法律武器维护自己的权益。让我们一起维护一个良好的技术创作环境!
1414
1515

@@ -51,19 +51,12 @@
5151

5252
## 如何使用该刷题攻略
5353

54-
电脑端还看不到留言,大家可以在公众号[「代码随想录」](https://img-blog.csdnimg.cn/20201124161234338.png),左下角有「刷题攻略」,这是手机版刷题攻略,看完就会发现有很多录友(代码随想录的朋友们)在文章下留言打卡,这份刷题顺序和题解已经陪伴了上万录友了,同时也说明文章的质量是经过上万人的考验!
55-
56-
欢迎每一位学习算法的小伙伴加入到这个学习阵营来!
57-
58-
**目前已经更新了,数组-> 链表-> 哈希表->字符串->栈与队列->树->回溯->贪心,八个专题了,正在讲解动态规划!**
54+
按照先面的排列顺序,从数组开始刷起就可以了,顺序都安排好了,按顺序刷就好。
5955

6056
在刷题攻略中,每个专题开始都有理论基础篇,并不像是教科书般的理论介绍,而是从实战中归纳需要的基础知识。每个专题结束都有总结篇,最这个专题的归纳总结。
6157

6258
如果你是算法老手,这篇攻略也是复习的最佳资料,如果把每个系列对应的总结篇,快速过一遍,整个算法知识体系以及各种解法就重现脑海了。
6359

64-
65-
目前「代码随想录」刷题攻略更新了:**200多篇文章,精讲了200道经典算法题目,共60w字的详细图解,大部分题目都搭配了20分钟左右的视频讲解**,视频质量很好,口碑很好,大家可以去看看,视频列表:[代码随想录视频讲解](https://www.bilibili.com/video/BV1fA4y1o715)
66-
6760
**这里每一篇题解,都是精品,值得仔细琢磨**
6861

6962
我在题目讲解中统一使用C++,但你会发现下面几乎每篇题解都配有其他语言版本,Java、Python、Go、JavaScript等等,正是这些[热心小伙们](https://github.com/youngyangyang04/leetcode-master/graphs/contributors)贡献的代码,当然我也会严格把控代码质量。
@@ -100,14 +93,11 @@
10093
* [程序员应该用什么用具来写文档?](./problems/前序/程序员写文档工具.md)
10194

10295
* 求职
96+
* [ACM模式练习网站,卡码网](https://kamacoder.com/)
10397
* [程序员的简历应该这么写!!(附简历模板)](./problems/前序/程序员简历.md)
98+
* [【专业技能】应该这样写!](https://programmercarl.com/other/jianlizhuanye.html)
99+
* [【项目经历】应该这样写!](https://programmercarl.com/other/jianlixiangmu.html)
104100
* [BAT级别技术面试流程和注意事项都在这里了](./problems/前序/BAT级别技术面试流程和注意事项都在这里了.md)
105-
* [北京有这些互联网公司,你都知道么?](./problems/前序/北京互联网公司总结.md)
106-
* [上海有这些互联网公司,你都知道么?](./problems/前序/上海互联网公司总结.md)
107-
* [深圳有这些互联网公司,你都知道么?](./problems/前序/深圳互联网公司总结.md)
108-
* [广州有这些互联网公司,你都知道么?](./problems/前序/广州互联网公司总结.md)
109-
* [成都有这些互联网公司,你都知道么?](./problems/前序/成都互联网公司总结.md)
110-
* [杭州有这些互联网公司,你都知道么?](./problems/前序/杭州互联网公司总结.md)
111101

112102
* 算法性能分析
113103
* [关于时间复杂度,你不知道的都在这里!](./problems/前序/关于时间复杂度,你不知道的都在这里!.md)
@@ -506,7 +496,7 @@
506496

507497
# 关于作者
508498

509-
大家好,我是程序员Carl,哈工大师兄,《代码随想录》作者,先后在腾讯和百度从事后端技术研发,CSDN博客专家。对算法和C++后端技术有一定的见解,利用工作之余重新刷leetcode。
499+
大家好,我是程序员Carl,哈工大师兄,《代码随想录》作者,先后在腾讯和百度从事后端技术研发。对算法和C++后端技术有一定的见解,利用工作之余重新刷leetcode。
510500

511501
加入「代码随想录」刷题小分队(微信群),可以扫下方二维码,加代码随想录客服微信。
512502

@@ -527,4 +517,3 @@
527517
<div align="center"><img src="https://code-thinking-1253855093.file.myqcloud.com/pics/20211026122841.png" data-img="1" width="650" height="500"></img></div>
528518

529519

530-
<!-- 24. [贪心算法:714.买卖股票的最佳时机含手续费](./problems/0714.买卖股票的最佳时机含手续费.md) -->

‎problems/0070.爬楼梯.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
* 1 阶 + 2 阶
3030
* 2 阶 + 1 阶
3131

32-
#视频讲解
32+
## 算法公开课
3333

34-
**《代码随想录》算法视频公开课:[带你学透动态规划-爬楼梯|LeetCode:70.爬楼梯)](https://www.bilibili.com/video/BV17h411h7UH),相信结合视频在看本篇题解,更有助于大家对本题的理解**
34+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[带你学透动态规划-爬楼梯|LeetCode:70.爬楼梯)](https://www.bilibili.com/video/BV17h411h7UH),相信结合视频在看本篇题解,更有助于大家对本题的理解**
3535

3636

3737
## 思路
@@ -522,3 +522,4 @@ impl Solution {
522522
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
523523
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
524524
</a>
525+

‎problems/0070.爬楼梯完全背包版本.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ public:
127127
128128
## 其他语言版本
129129
130+
### Java:
130131
131-
Java:
132132
```java
133133
class Solution {
134134
public int climbStairs(int n) {
@@ -148,7 +148,7 @@ class Solution {
148148
}
149149
```
150150

151-
Python3:
151+
### Python3:
152152

153153

154154
```python
@@ -166,8 +166,8 @@ class Solution:
166166
return dp[n]
167167
```
168168

169+
### Go:
169170

170-
Go:
171171
```go
172172
func climbStairs(n int) int {
173173
//定义
@@ -189,7 +189,8 @@ func climbStairs(n int) int {
189189
}
190190
```
191191

192-
JavaScript:
192+
### JavaScript:
193+
193194
```javascript
194195
var climbStairs = function(n) {
195196
const dp = new Array(n + 1).fill(0);
@@ -206,7 +207,7 @@ var climbStairs = function(n) {
206207
};
207208
```
208209

209-
TypeScript:
210+
### TypeScript:
210211

211212
```typescript
212213
function climbStairs(n: number): number {
@@ -226,7 +227,7 @@ function climbStairs(n: number): number {
226227
};
227228
```
228229

229-
Rust:
230+
### Rust:
230231

231232
```rust
232233
impl Solution {
@@ -250,4 +251,3 @@ impl Solution {
250251
<a href="https://programmercarl.com/other/kstar.html" target="_blank">
251252
<img src="../pics/网站星球宣传海报.jpg" width="1000"/>
252253
</a>
253-

‎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/0121.买卖股票的最佳时机.md‎

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,9 @@
2424
* 输出:0
2525
解释:在这种情况下, 没有交易完成, 所以最大利润为 0。
2626

27-
# 算法公开课
28-
29-
**《代码随想录》算法视频公开课:[动态规划之 LeetCode:121.买卖股票的最佳时机1](https://www.bilibili.com/video/BV1Xe4y1u77q),相信结合视频再看本篇题解,更有助于大家对本题的理解**
30-
27+
## 算法公开课
3128

29+
**[《代码随想录》算法视频公开课](https://programmercarl.com/other/gongkaike.html):[动态规划之 LeetCode:121.买卖股票的最佳时机1](https://www.bilibili.com/video/BV1Xe4y1u77q),相信结合视频再看本篇题解,更有助于大家对本题的理解**
3230

3331
## 思路
3432

@@ -202,7 +200,7 @@ public:
202200

203201
## 其他语言版本
204202

205-
Java:
203+
### Java:
206204

207205
> 贪心法:
208206

@@ -294,8 +292,7 @@ class Solution {
294292
295293
```
296294

297-
298-
Python:
295+
### Python:
299296

300297
> 贪心法:
301298
```python
@@ -351,7 +348,8 @@ class Solution:
351348
return dp1
352349
```
353350

354-
Go:
351+
### Go:
352+
355353
> 贪心法:
356354
```Go
357355
func maxProfit(prices []int) int {
@@ -418,7 +416,7 @@ func max(a, b int) int {
418416
}
419417
```
420418

421-
JavaScript:
419+
### JavaScript:
422420

423421
> 动态规划
424422
@@ -454,7 +452,7 @@ var maxProfit = function(prices) {
454452
};
455453
```
456454

457-
TypeScript:
455+
### TypeScript:
458456

459457
> 贪心法
460458
@@ -492,7 +490,7 @@ function maxProfit(prices: number[]): number {
492490
};
493491
```
494492

495-
C#:
493+
### C#:
496494

497495
> 贪心法
498496
@@ -533,7 +531,7 @@ public class Solution
533531
}
534532
```
535533

536-
Rust:
534+
### Rust:
537535

538536
> 贪心
539537

0 commit comments

Comments
(0)

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