Skip to content

Commit 4fd1d8c

Browse files
committed
Merge branch 'main' of https://github.com/itcharge/AlgoNote
2 parents cd1241a + eac4b18 commit 4fd1d8c

38 files changed

+1945
-2022
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
<div align='center'>
2+
<img src="https://qcdn.itcharge.cn/images/20250923171331.png" alt="alt text" width="100%"/>
3+
<h1>算法通关手册</h1>
4+
</div>
5+
6+
<div align="center">
7+
<img src="https://img.shields.io/github/stars/ITCharge/AlgoNote?style=flat&logo=github" alt="GitHub stars"/>
8+
<img src="https://img.shields.io/github/forks/ITCharge/AlgoNote?style=flat&logo=github" alt="GitHub forks"/>
9+
<img src="https://img.shields.io/badge/language-Chinese%20%7C%20Python-brightgreen?style=flat" alt="Language"/>
10+
<a href="https://github.com/ITCharge/AlgoNote"><img src="https://img.shields.io/badge/GitHub-Project-blue?style=flat&logo=github" alt="GitHub Project"/></a>
11+
<p></p>
12+
<h3>📚 从零开始的「算法与数据结构」学习教程</h3>
13+
<p><em>一本系统讲解算法与数据结构、涵盖 LeetCode 题解的中文学习手册</em></p>
14+
</div>
15+
16+
<div align="center">
17+
<a href="https://algo.itcharge.cn/">
18+
<img src="https://qcdn.itcharge.cn/images/btn_read_online.svg" width="145" alt="在线阅读"></a>
19+
<a href="https://github.com/ITCharge/AlgoNote">
20+
<img src="https://qcdn.itcharge.cn/images/btn_github_link.svg" width="145" alt="GitHub 仓库"></a>
21+
</div>
22+
123
## 1. 本书简介
224

325
本书不仅仅只是一本算法题解书,更是一本算法与数据结构基础知识的讲解书。
@@ -7,20 +29,14 @@
729
- 本项目先从基础的数据结构和算法开始讲解,再针对不同分类的数据结构和算法,进行具体题目的讲解分析。让读者可以通过「算法基础理论学习」和「编程实战学习」相结合的方式,彻底的掌握算法知识。
830
- 本项目从各大知名互联网公司面试算法题中整理汇总了 **「LeetCode 200 道高频面试题」**,帮助面试者更有针对性的准备面试。
931

10-
### 1.1 源码地址
11-
12-
本书内容及代码都放在 [Github repo](https://github.com/itcharge/AlgoNote) 中,欢迎在下方项目中 **「Star ⭐️ 」****「Fork」**,这是对我最大的鼓励和支持。
13-
14-
- Github 地址:[https://github.com/itcharge/AlgoNote](https://github.com/itcharge/AlgoNote)
15-
16-
### 1.2 目标读者
32+
### 1.1 目标读者
1733

1834
- 拥有 Python 编程基础或其他编程语言基础的编程爱好者
1935
- 对 LeetCode 刷题感兴趣或准备算法面试的面试人员
2036
- 对算法感兴趣的计算机专业学生或程序员
2137
- 想要提升编程思维和问题解决能力的开发者
2238

23-
### 1.3 内容结构
39+
### 1.2 内容结构
2440

2541
本书采用算法与数据结构相结合的方法,把内容分为如下几个主要部分:
2642

@@ -36,7 +52,7 @@
3652
- **9. 附加内容**:作为全书的扩展模块。
3753
- **10. 题目解析**:讲解 LeetCode 上刷过的所有题目,可按照对应题号进行检索和学习。
3854

39-
### 1.4 使用说明
55+
### 1.3 使用说明
4056

4157
- 本电子书的左侧为所有章节目录导航,可直接点击对应章节跳转阅读。
4258
- 本电子书左上角有搜索栏,可以帮你迅速找到想看的章节和题解文章。

docs/00_preface/00_04_leetcode_guide.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ class Solution:
156156

157157
当然,也可以直接看我写的「算法通关手册」,欢迎指正和提出建议,万分感谢。
158158

159-
- 「算法通关手册」GitHub 地址:[https://github.com/itcharge/AlgoNote](https://github.com/itcharge/AlgoNote)
159+
- 「算法通关手册」GitHub 地址:[https://github.com/ITCharge/AlgoNote](https://github.com/ITCharge/AlgoNote)
160160
- 「算法通关手册」电子书网站地址:[https://algo.itcharge.cn](https://algo.itcharge.cn)
161161

162162
### 3.2 LeetCode 刷题顺序
@@ -175,14 +175,14 @@ LeetCode 的题目序号并不是按难易程度排序的,不建议按序号
175175

176176
或者直接按照我整理的分类刷题列表进行刷题:
177177

178-
- LeetCode 分类刷题列表:[点击打开「LeetCode 分类刷题列表」](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md)
178+
- LeetCode 分类刷题列表:[点击打开「LeetCode 分类刷题列表」](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md)
179179

180180
正在准备面试、没有太多时间刷题的小伙伴,可以按照我总结的「LeetCode 面试最常考 100 题」、「LeetCode 面试最常考 200 题」进行刷题。
181181

182182
> **说明**:「LeetCode 面试最常考 100 题」、「LeetCode 面试最常考 200 题」是笔者根据「[CodeTop 企业题库](https://codetop.cc/home)」按频度从高到低进行筛选,并且去除了一部分 LeetCode 上没有的题目和重复题目后得到的题目清单。
183183
184-
- [LeetCode 面试最常考 100 题](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_07_interview_100_list.md)
185-
- [LeetCode 面试最常考 200 题](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_08_interview_200_list.md)
184+
- [LeetCode 面试最常考 100 题](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_07_interview_100_list.md)
185+
- [LeetCode 面试最常考 200 题](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_08_interview_200_list.md)
186186

187187
### 3.3 LeetCode 刷题技巧
188188

@@ -247,8 +247,8 @@ LeetCode 是一个在线编程练习平台,主要用于提升算法和编程
247247

248248
## 练习题目
249249

250-
- [2235. 两整数相加](https://github.com/itcharge/AlgoNote/tree/main/docs/solutions/2200-2299/add-two-integers.md)
251-
- [1929. 数组串联](https://github.com/itcharge/AlgoNote/tree/main/docs/solutions/1900-1999/concatenation-of-array.md)
250+
- [2235. 两整数相加](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/2200-2299/add-two-integers.md)
251+
- [1929. 数组串联](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/1900-1999/concatenation-of-array.md)
252252

253253
## 参考资料
254254

docs/00_preface/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
![](https://qcdn.itcharge.cn/images/20250923152426.png)
2+
3+
::: tip 引 言
4+
数据结构如同星辰,算法宛若清风,星光与微风交织,点亮智慧的夜空。
5+
6+
愿本书与你同行,助你轻装前行,照亮属于你的算法之路。
7+
:::
8+
19
# 本章内容
210

311
- [0.1 前言](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_01_preface.md)

docs/01_array/01_15_array_two_pointers.md

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,16 +345,10 @@ while left_1 < len(nums1) and left_2 < len(nums2):
345345
##### 思路 1:分离双指针
346346

347347
1. 先对 $nums1$ 和 $nums2$ 排序。
348-
2. 用两个指针 $left\_1$、$left\underline{\hspace{0.
349-
5em}}2$ 分别从两个数组头部开始遍历。
350-
3. 若 $nums1[left\_1] == nums2[left\underline
351-
{\hspace{0.5em}}2]$,将该元素(去重)加入结果,并同时右移 $left\_1$、$left\underline
352-
{\hspace{0.5em}}2$。
353-
4. 若 $nums1[left\_1] < nums2[left\underline
354-
{\hspace{0.5em}}2]$,则 $left\_1$ 右移。
355-
5. 若 $nums1[left\_1] > nums2[left\underline
356-
{\hspace{0.5em}}2]$,则 $left\underline
357-
{\hspace{0.5em}}2$ 右移。
348+
2. 用两个指针 $left\_1$、$left\_2$ 分别从两个数组头部开始遍历。
349+
3. 若 $nums1[left\_1] == nums2[left\_2]$,将该元素(去重)加入结果,并同时右移 $left\_1$、$left\_2$。
350+
4. 若 $nums1[left\_1] < nums2[left\_2]$,则 $left\_1$ 右移。
351+
5. 若 $nums1[left\_1] > nums2[left\_2]$,则 $left\_2$ 右移。
358352
6. 遍历结束后返回结果数组。
359353

360354
##### 思路 1:代码

docs/01_array/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
![](https://qcdn.itcharge.cn/images/20250923140234.png)
2+
3+
::: tip 引 言
4+
数组如同连续砖块砌成的墙。
5+
6+
每一块砖石紧密相依,井然有序,宛如时光的流转,悄然记录着数据的点滴。
7+
:::
8+
19
## 本章内容
210

311
- [1.1 数组基础](https://github.com/ITCharge/AlgoNote/tree/main/docs/01_array/01_01_array_basic.md)

docs/02_linked_list/02_01_linked_list_basic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def removeInside(self, index):
323323
- [0234. 回文链表](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0200-0299/palindrome-linked-list.md)
324324
- [0138. 随机链表的复制](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0100-0199/copy-list-with-random-pointer.md)
325325

326-
- [链表基础题目列表](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E9%93%BE%E8%A1%A8%E5%9F%BA%E7%A1%80%E9%A2%98%E7%9B%AE)
326+
- [链表基础题目列表](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E9%93%BE%E8%A1%A8%E5%9F%BA%E7%A1%80%E9%A2%98%E7%9B%AE)
327327

328328
## 参考资料
329329

docs/02_linked_list/index.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
![](https://qcdn.itcharge.cn/images/20250923140251.png)
2+
3+
::: tip 引 言
4+
链表如同夜空中串联的星星。
5+
6+
节点相连,如繁星串珠,静静铺展成一条灵动的数据长河。
7+
:::
8+
19
## 本章内容
210

311
- [2.1 链表基础](https://github.com/ITCharge/AlgoNote/tree/main/docs/02_linked_list/02_01_linked_list_basic.md)

docs/03_stack_queue_hash_table/03_01_stack_basic.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class Solution:
356356
- [0394. 字符串解码](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0300-0399/decode-string.md)
357357
- [0946. 验证栈序列](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0900-0999/validate-stack-sequences.md)
358358

359-
- [栈基础题目列表](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E6%A0%88%E5%9F%BA%E7%A1%80%E9%A2%98%E7%9B%AE)
359+
- [栈基础题目列表](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E6%A0%88%E5%9F%BA%E7%A1%80%E9%A2%98%E7%9B%AE)
360360

361361
## 参考资料
362362

docs/03_stack_queue_hash_table/03_02_monotone_stack.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ class Solution:
266266
- [0739. 每日温度](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0700-0799/daily-temperatures.md)
267267
- [0316. 去除重复字母](https://github.com/ITCharge/AlgoNote/tree/main/docs/solutions/0300-0399/remove-duplicate-letters.md)
268268

269-
- [单调栈题目列表](https://github.com/itcharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E5%8D%95%E8%B0%83%E6%A0%88%E9%A2%98%E7%9B%AE)
269+
- [单调栈题目列表](https://github.com/ITCharge/AlgoNote/tree/main/docs/00_preface/00_06_categories_list.md#%E5%8D%95%E8%B0%83%E6%A0%88%E9%A2%98%E7%9B%AE)
270270

271271
## 参考资料
272272

docs/03_stack_queue_hash_table/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
![](https://qcdn.itcharge.cn/images/20250923140308.png)
2+
3+
::: tip 引 言
4+
栈如杯中叠盘,盘盘相扣,取放皆自上,后进先出。
5+
6+
队列如河中行舟,前舟先行,后舟继发,川流不息。
7+
8+
哈希表如图书馆索引卡,万卷藏于指尖,瞬息之间,尽览群书。
9+
:::
10+
111
## 本章内容
212

313
- [3.1 栈基础](https://github.com/ITCharge/AlgoNote/tree/main/docs/03_stack_queue_hash_table/03_01_stack_basic.md)

0 commit comments

Comments
 (0)