|
1 | | -# 零基础算法面试指南 |
2 | | -[](https://github.com/zdong1995/LeetCode-Solution-Well-Explained) [](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems)   [](https://github.com/zdong1995/) |
| 1 | +[](https://github.com/zdong1995/LeetCode-Solution-Well-Explained) [](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems)    |
3 | 2 |
|
4 | | -[English Version](./README-EN.md) |
| 3 | + |
| 4 | +文章首发于公众号『[董小染](./docs/img/wechat.png)』,算法文章主页:[https://dongxiaoran.com/algo/](https://dongxiaoran.com/algo/) |
5 | 5 |
|
6 | | -大家好,我是小染,这份算法与数据结构指南适用于转行和零基础同学,按类型题目整理更新,带你从零开始培养算法思维和准备算法面试。Repo 中包含有按类别总结的源码,便于 debug 练习,算法讲解文章链接:[小染的零基础算法面试指南](https://dongxiaoran.com/algo/)。 |
| 6 | +--- |
7 | 7 |
|
8 | | -欢迎点击上方 Badge 链接阅读我的 LeetCode Solution 代码,如果对你有帮助欢迎在 Github 点个 Star 和关注微信公众号『[董小染](https://dongxiaoran.com/images/qrcode.png)』。 |
| 8 | +⭐️ Repo 中含有按类别总结的源码,便于本地 debug 练习。对于没有收录的题目,欢迎点击上方 Badge 链接阅读我的 [LeetCode Solution Well Explained](https://github.com/zdong1995/LeetCode-Solution-Well-Explained) 代码,如果对你有帮助欢迎在 **Github 点个 Star**。 |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +在当前 LeetCode 千题时代下,刷完所有的题目是不现实的,因此更重要的是培养自己的**算法思维**和扎实**数据结构知识**,举一反三,深化思维,争取**做一题解决一类题目**,一通百通,高效快速准备算法面试。 |
| 13 | + |
| 14 | +本仓库归纳总结了 LeetCode 的同类型及相似思路的题目,按照从易到难的顺序,从线性到非线性数据结构的『增删改查』,从基础 Iterative 到深化 Recursion 思想,从 Intuitive 的算法到高阶的优化技巧,选取都是我认为比较经典或培养算法思维的题目,带你搭建起来自己的思维框架和套路模板。 |
9 | 15 |
|
10 | | -文章分为以下几部分进行安排,带你掌握面试高频算法与数据结构: |
11 | 16 | - 第一部分:从基础数据结构入手,从递归思想的入门与深化,再到高频的双指针和排序算法。 |
12 | 17 | - 第二部分:掌握搜索算法,宽度优先,深度优先,到记忆存储,剪枝优化,入门动态规划。 |
13 | 18 | - 第三部分:高频面试题目分析,复杂题目讲解,高级数据结构等。 |
14 | 19 |
|
15 | | -### 目录 |
| 20 | + |
| 21 | + |
| 22 | +在开始刷题学习前,花几分钟阅读一下我总结的算法学习方法论和我的刷题练习经验分享,帮助你建立一个更清晰的 big picture 和学习思路。 |
| 23 | + |
| 24 | +- [半年零基础到 LeetCode 300 题,我的算法学习方法论](https://dongxiaoran.com/algo/basic/intro/) |
| 25 | +- [当我们谈论刷题时,到底在刷什么](https://dongxiaoran.com/algo/basic/how/) |
| 26 | + |
| 27 | + |
| 28 | +## 目录 |
| 29 | + |
| 30 | +1. [基础数据结构与算法](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#1-基础数据结构与算法) |
| 31 | +2. [优雅重要的递归思维](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#2-优雅重要的递归思维) |
| 32 | +3. [巧妙高效的双指针](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#3-巧妙高效的双指针) |
| 33 | +4. [轻松手写排序算法](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#4-轻松手写排序算法) |
| 34 | +5. [宽度优先搜索 \(BFS\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#5-宽度优先搜索) |
| 35 | +6. [深度优先搜索 \(DFS\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#6-深度优先搜索) |
| 36 | +7. [数学归纳法与动态规划 \(DP\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#7-从数学归纳法入门动态规划) |
| 37 | +8. [高频题目类型讲解](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#8-高频题目类型讲解) |
| 38 | + |
| 39 | +## 1. 基础数据结构与算法 |
| 40 | + |
| 41 | +### 1.1 LinkedList 的 Iterative 操作 |
| 42 | +#### ⌨️ Article: [一题顶四题,一道题掌握 LinkedList 的 Iterative](https://dongxiaoran.com/algo/basic/iterativelist/) |
| 43 | + |
| 44 | +#### 👻 Algorithm Questions: |
16 | 45 |
|
17 | | -1. [基础数据结构与算法](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#fundamental) |
18 | | -2. [优雅重要的递归思维](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#recursion) |
19 | | -3. [巧妙高效的双指针](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#two-pointers) |
20 | | -4. [轻松手写排序算法](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#sorting) |
21 | | -5. [宽度优先搜索 \(BFS\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#bfs) |
22 | | -6. [深度优先搜索 \(DFS\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#dfs) |
23 | | -7. [数学归纳法与动态规划 \(DP\)](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#dp) |
24 | | -8. [高频题目类型讲解](https://github.com/zdong1995/Pattern-Summary-for-Algorithm-Problems#popular) |
| 46 | +- LC143: Reorder List |
| 47 | +- LC876: Find the middle node of Linked List |
| 48 | +- LC206: Reverse Linked List |
| 49 | +- LC21: Merge Two Sorted Linked list |
| 50 | + |
| 51 | +#### ✅ Solution: [My Java Code](src/main/java/algorithm/basic/iterative) |
| 52 | + |
| 53 | +### 1.2 Tree Iterative Traversal as Multi-level LinkedList |
25 | 54 |
|
26 | | -### 1. 基础数据结构与算法 |
| 55 | +#### ⌨️ Article: [Tree 还可以这样 O(1) 空间遍历?四题带你深入理解 LinkedList 与 Tree 的关系](https://dongxiaoran.com/algo/basic/treetolist/) |
27 | 56 |
|
28 | | -- [x] 半年零基础到 LeetCode 300 题,我的算法学习方法论: ✅ [Post](https://dongxiaoran.com/algo/basic/intro/) |
29 | | -- [x] 当我们谈论刷题时,到底在刷什么: ✅ [Post](https://dongxiaoran.com/algo/basic/how/) |
30 | | -- [x] 一题顶四题,一道题掌握 LinkedList 的 Iterative: ✅ [Post](https://dongxiaoran.com/algo/basic/iterativelist/) ⭐️ [Code](src/main/java/algorithm/basic/iterative) |
31 | | -- [x] Tree 还可以这样 O(1) 空间遍历?四题带你深入理解 LinkedList 与 Tree 的关系: ✅ [Post](https://dongxiaoran.com/algo/basic/treetolist/) ⭐️ [Code](src/main/java/algorithm/basic/iterativetree) |
| 57 | +#### 👻 Algorithm Questions: |
| 58 | +- LC114: Flatten Binary Tree to Linked List |
| 59 | +- LC430: Flatten a Multilevel Doubly Linked List |
| 60 | +- LC116: Populating Next Right Pointers in Each Node |
| 61 | +- LC117: Populating Next Right Pointers in Each Node II |
| 62 | +#### ✅ Solution: [My Java Code](src/main/java/algorithm/basic/iterativetree) |
32 | 63 |
|
33 | | -- [ ] Binary Search |
34 | 64 |
|
35 | | -### 2. 优雅重要的递归思维 |
| 65 | +## 2. 优雅重要的递归思维 |
36 | 66 |
|
37 | 67 | - [ ] Introduction to Recursion |
38 | 68 |
|
|
42 | 72 |
|
43 | 73 | - [ ] Recursion to Iterative |
44 | 74 |
|
45 | | -### 3. 巧妙高效的双指针 |
| 75 | +## 3. 巧妙高效的双指针 |
46 | 76 |
|
47 | 77 | - [x] Two Sum Pattern: [Code](src/main/java/algorithm/pointers/twosum) |
48 | 78 | - [ ] Slow-Fast Pointers |
|
55 | 85 |
|
56 | 86 | - [ ] Partition |
57 | 87 |
|
58 | | -### 4. 轻松手写排序算法 |
| 88 | +## 4. 轻松手写排序算法 |
59 | 89 |
|
60 | 90 | - [ ] Merge Sort |
61 | 91 |
|
|
65 | 95 |
|
66 | 96 | - [ ] Comparison-based Sort |
67 | 97 |
|
68 | | -### 5. 宽度优先搜索 |
| 98 | +## 5. 宽度优先搜索 |
69 | 99 |
|
70 | 100 | - [ ] Level Order Traversal |
71 | 101 |
|
|
77 | 107 |
|
78 | 108 | - [ ] Best First Search and Dijkstra |
79 | 109 |
|
80 | | -### 6. 深度优先搜索 |
| 110 | +## 6. 深度优先搜索 |
81 | 111 |
|
82 | 112 | - [ ] Subset |
83 | 113 |
|
|
89 | 119 |
|
90 | 120 | - [ ] Graph Search |
91 | 121 |
|
92 | | -### 7. 数学归纳法与动态规划 |
| 122 | +## 7. 从数学归纳法入门动态规划 |
93 | 123 |
|
94 | 124 | - [ ] 1D DP |
95 | 125 |
|
96 | 126 | - [ ] 2D DP |
97 | 127 |
|
98 | 128 | - [ ] Greedy |
99 | 129 |
|
100 | | -### 8. 高频题目类型讲解 |
| 130 | +## 8. 高频题目类型讲解 |
101 | 131 |
|
102 | 132 | - [ ] Merge Intervals |
103 | 133 |
|
|
109 | 139 |
|
110 | 140 | - [ ] Data Structure Design |
111 | 141 |
|
112 | | -<<<<<<< HEAD |
113 | 142 | - [ ] Bit Operations |
114 | | -======= |
115 | | -- [ ] Bit Operations |
116 | | - |
117 | | -### 9. Java 学习笔记 |
118 | | - |
119 | | -- [ ] Java Basic Review |
120 | | - |
121 | | -- [ ] Data Strucutre Implementation |
122 | | - |
123 | | -- [ ] Multi-thread and Concurrency |
124 | | - |
125 | | -### 10. 面向对象设计 |
126 | | - |
127 | | -- [ ] Encapsulation, Polymorphism and Inheritance |
128 | | - |
129 | | -- [ ] Singleton Pattern |
130 | | - |
131 | | -- [ ] Builder Pattern |
132 | | - |
133 | | -- [ ] Factory Pattern |
134 | | - |
135 | | -- [ ] Design Pattern |
136 | 143 |
|
137 | | -- [ ] OOD Practice |
138 | | ->>>>>>> 6d10150a335b05623ef687622a5aece971c238cd |
|
0 commit comments