Skip to content

Commit d5e4753

Browse files
committed
update docs
1 parent affe992 commit d5e4753

File tree

19 files changed

+294
-225
lines changed

19 files changed

+294
-225
lines changed

docs/README.md

Lines changed: 65 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,70 @@
22

33
> :dart: 所有配套源码整理归档在 [**algorithm-tutorial**](https://github.com/dunwu/algorithm-tutorial) 项目中。
44
5-
## :memo: 知识点
6-
7-
- [**:one: 数据结构**](data-structure/README.md)
8-
- [数组](data-structure/array.md)
9-
- [](data-structure/stack.md)
10-
- [队列](data-structure/queue.md)
11-
- [链表](data-structure/list.md)
12-
- [](data-structure/tree/README.md)
13-
- [](data-structure/graph.md)
14-
- [](data-structure/heap.md)
15-
- [散列表](data-structure/hash.md)
16-
- [**:two: 算法**](algorithm/README.md)
17-
- [查找算法](algorithm/search)
18-
- [排序算法](algorithm/sort.md)
19-
20-
## :books: 学习资源
21-
22-
###
23-
24-
#### 刷题必备
25-
26-
- 《剑指 offer》
27-
- 《编程之美》
28-
- 《编程之法:面试和算法心得》
29-
- 《算法谜题》 都是思维题
30-
31-
#### 基础
32-
33-
-[编程珠玑(第 2 版)](https://www.amazon.cn/gp/product/B00SFZH0DC/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00SFZH0DC&linkCode=as2&tag=vastwork-23)
34-
-[编程珠玑(续)](https://www.amazon.cn/gp/product/B0150BMQDM/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B0150BMQDM&linkCode=as2&tag=vastwork-23)
35-
-[数据结构与算法分析 : C++描述(第 4 版)](https://www.amazon.cn/gp/product/B01LDG2DSG/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B01LDG2DSG&linkCode=as2&tag=vastwork-23)
36-
-[数据结构与算法分析 : C 语言描述(第 2 版)](https://www.amazon.cn/gp/product/B002WC7NGS/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B002WC7NGS&linkCode=as2&tag=vastwork-23)
37-
-[数据结构与算法分析 : Java 语言描述(第 2 版)](https://www.amazon.cn/gp/product/B01CNP0CG6/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B01CNP0CG6&linkCode=as2&tag=vastwork-23)
38-
-[算法(第 4 版)](https://www.amazon.cn/gp/product/B009OCFQ0O/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B009OCFQ0O&linkCode=as2&tag=vastwork-23)》- 这本近千页的书只有 6 章,其中四章分别是排序,查找,图,字符串,足见介绍细致
39-
40-
#### 算法设计
41-
42-
-[算法设计与分析基础(第 3 版)](https://www.amazon.cn/gp/product/B00S4HCQUI/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00S4HCQUI&linkCode=as2&tag=vastwork-23)
43-
- 《算法引论》 - 告诉你如何创造算法 断货
44-
- 《Algorithm Design Manual》 - 算法设计手册 红皮书
45-
- [《算法导论》](https://www.amazon.cn/gp/product/B00AK7BYJY/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00AK7BYJY&linkCode=as2&tag=vastwork-23) - 是一本对算法介绍比较全面的经典书籍
46-
- 《Algorithms on Strings,Trees and Sequences》
47-
- 《Advanced Data Structures》 - 各种诡异高级的数据结构和算法 如元胞自动机、斐波纳契堆、线段树 600 块
48-
49-
### 参考链接和学习网站
50-
51-
- https://github.com/nonstriater/Learn-Algorithms
52-
- https://github.com/trekhleb/javascript-algorithms
53-
- https://github.com/kdn251/interviews/blob/master/README-zh-cn.md#%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84
54-
- [July 博客](http://blog.csdn.net/v_july_v)
55-
- 《数学建模十大经典算法》
56-
- 《数据挖掘领域十大经典算法》
57-
- 《十道海量数据处理面试题》
58-
- 《数字图像处理领域的二十四个经典算法》
59-
- 《精选微软等公司经典的算法面试 100 题》
60-
- [The-Art-Of-Programming-By-July](https://github.com/julycoding/The-Art-Of-Programming-By-July)
61-
- [微软面试 100 题](http://blog.csdn.net/column/details/ms100.html)
62-
- [程序员编程艺术](http://blog.csdn.net/v_JULY_v/article/details/6460494)
63-
64-
### 基本算法演示
65-
66-
- <http://sjjg.js.zwu.edu.cn/SFXX/sf1/sfys.html>
67-
- <http://www.cs.usfca.edu/\~galles/visualization/Algorithms.html>
68-
69-
### 编程网站
70-
71-
- [leetcode](http://leetcode.com/)
72-
- [openjudge](http://openjudge.cn/) 开放在线程序评测平台,可以创建自己的 OJ 小组 [九度 OJ](http://ac.jobdu.com/index.php)
73-
- 这有个[ACM 训练方案](http://www.java3z.com/cwbwebhome/article/article19/res041.html)
74-
75-
### 其它
76-
77-
- [高级数据结构和算法](https://www.coursera.org/learn/gaoji-shuju-jiegou/) 北大教授张铭老师在 coursera 上的课程。完成这门课之时,你将掌握多维数组、广义表、Trie 树、AVL 树、伸展树等高级数据结构,并结合内排序、外排序、检索、索引有关的算法,高效地解决现实生活中一些比较复杂的应用问题。当然 coursera 上也还有很多其它算法方面的视频课程。
78-
- [算法设计与分析 Design and Analysis of Algorithms](https://class.coursera.org/algorithms-001/lecture) 由北大教授 Wanling Qu 在 coursera 讲授的一门算法课程。首先介绍一些与算法有关的基础知识,然后阐述经典的算法设计思想和分析技术,主要涉及的算法设计技术是:分治策略、动态规划、贪心法、回溯与分支限界等。每个视频都配有相应的讲义(pdf 文件)以便阅读和复习。
79-
80-
## :door: 传送门
5+
## 📝 知识点
6+
7+
### [数据结构](data-structure/README.md)
8+
9+
- [数组](data-structure/array.md)
10+
- [](data-structure/stack.md)
11+
- [队列](data-structure/queue.md)
12+
- [链表](data-structure/list.md)
13+
- [](data-structure/tree/README.md)
14+
- [](data-structure/graph.md)
15+
- [](data-structure/heap.md)
16+
- [散列表](data-structure/hash.md)
17+
18+
### [算法](algorithm/README.md)
19+
20+
- [查找算法](algorithm/search)
21+
- [排序算法](algorithm/sort.md)
22+
23+
## 📚 学习资源
24+
25+
-
26+
- 刷题必备
27+
- 《剑指 offer》
28+
- 《编程之美》
29+
- 《编程之法:面试和算法心得》
30+
- 《算法谜题》 都是思维题
31+
- 基础
32+
-[编程珠玑(第 2 版)](https://www.amazon.cn/gp/product/B00SFZH0DC/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00SFZH0DC&linkCode=as2&tag=vastwork-23)
33+
-[编程珠玑(续)](https://www.amazon.cn/gp/product/B0150BMQDM/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B0150BMQDM&linkCode=as2&tag=vastwork-23)
34+
-[数据结构与算法分析 : C++描述(第 4 版)](https://www.amazon.cn/gp/product/B01LDG2DSG/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B01LDG2DSG&linkCode=as2&tag=vastwork-23)
35+
-[数据结构与算法分析 : C 语言描述(第 2 版)](https://www.amazon.cn/gp/product/B002WC7NGS/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B002WC7NGS&linkCode=as2&tag=vastwork-23)
36+
-[数据结构与算法分析 : Java 语言描述(第 2 版)](https://www.amazon.cn/gp/product/B01CNP0CG6/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B01CNP0CG6&linkCode=as2&tag=vastwork-23)
37+
-[算法(第 4 版)](https://www.amazon.cn/gp/product/B009OCFQ0O/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B009OCFQ0O&linkCode=as2&tag=vastwork-23)》- 这本近千页的书只有 6 章,其中四章分别是排序,查找,图,字符串,足见介绍细致
38+
- 算法设计
39+
-[算法设计与分析基础(第 3 版)](https://www.amazon.cn/gp/product/B00S4HCQUI/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00S4HCQUI&linkCode=as2&tag=vastwork-23)
40+
- 《算法引论》 - 告诉你如何创造算法 断货
41+
- 《Algorithm Design Manual》 - 算法设计手册 红皮书
42+
- [《算法导论》](https://www.amazon.cn/gp/product/B00AK7BYJY/ref=as_li_qf_sp_asin_il_tl?ie=UTF8&camp=536&creative=3200&creativeASIN=B00AK7BYJY&linkCode=as2&tag=vastwork-23) - 是一本对算法介绍比较全面的经典书籍
43+
- 《Algorithms on Strings,Trees and Sequences》
44+
- 《Advanced Data Structures》 - 各种诡异高级的数据结构和算法 如元胞自动机、斐波纳契堆、线段树 600 块
45+
- 参考链接和学习网站
46+
- https://github.com/nonstriater/Learn-Algorithms
47+
- https://github.com/trekhleb/javascript-algorithms
48+
- https://github.com/kdn251/interviews/blob/master/README-zh-cn.md#%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84
49+
- [July 博客](http://blog.csdn.net/v_july_v)
50+
- 《数学建模十大经典算法》
51+
- 《数据挖掘领域十大经典算法》
52+
- 《十道海量数据处理面试题》
53+
- 《数字图像处理领域的二十四个经典算法》
54+
- 《精选微软等公司经典的算法面试 100 题》
55+
- [The-Art-Of-Programming-By-July](https://github.com/julycoding/The-Art-Of-Programming-By-July)
56+
- [微软面试 100 题](http://blog.csdn.net/column/details/ms100.html)
57+
- [程序员编程艺术](http://blog.csdn.net/v_JULY_v/article/details/6460494)
58+
- 基本算法演示
59+
- <http://sjjg.js.zwu.edu.cn/SFXX/sf1/sfys.html>
60+
- <http://www.cs.usfca.edu/\~galles/visualization/Algorithms.html>
61+
- 编程网站
62+
- [leetcode](http://leetcode.com/)
63+
- [openjudge](http://openjudge.cn/) 开放在线程序评测平台,可以创建自己的 OJ 小组 [九度 OJ](http://ac.jobdu.com/index.php)
64+
- 这有个[ACM 训练方案](http://www.java3z.com/cwbwebhome/article/article19/res041.html)
65+
- 其它
66+
- [高级数据结构和算法](https://www.coursera.org/learn/gaoji-shuju-jiegou/) 北大教授张铭老师在 coursera 上的课程。完成这门课之时,你将掌握多维数组、广义表、Trie 树、AVL 树、伸展树等高级数据结构,并结合内排序、外排序、检索、索引有关的算法,高效地解决现实生活中一些比较复杂的应用问题。当然 coursera 上也还有很多其它算法方面的视频课程。
67+
- [算法设计与分析 Design and Analysis of Algorithms](https://class.coursera.org/algorithms-001/lecture) 由北大教授 Wanling Qu 在 coursera 讲授的一门算法课程。首先介绍一些与算法有关的基础知识,然后阐述经典的算法设计思想和分析技术,主要涉及的算法设计技术是:分治策略、动态规划、贪心法、回溯与分支限界等。每个视频都配有相应的讲义(pdf 文件)以便阅读和复习。
68+
69+
## 🚪 传送门
8170

8271
| [技术文档归档](https://github.com/dunwu/blog) | [算法和数据结构教程系列](https://github.com/dunwu/algorithm-tutorial) |

docs/algorithm/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
title: 算法
3-
date: 2019-02-19 17:01:00
4-
categories: ['algorithm','algorithm']
5-
tags: ['algorithm']
6-
---
7-
81
# 算法
92

103
## 算法思想

docs/algorithm/search/hash-search.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
title: Hash 表的查找
3-
date: 2015-03-16 14:19
4-
categories: ['algorithm','data-structure']
5-
tags: ['data-structure', 'search']
6-
---
7-
81
# Hash 表的查找
92

103
## 要点

docs/algorithm/search/linear-list-search.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
title: 线性表的查找
3-
date: 2015-03-10 18:29
4-
categories: ['algorithm','data-structure']
5-
tags: ['data-structure', 'search']
6-
---
7-
81
# 线性表的查找
92

103
## 概念

docs/algorithm/sort.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
title: 细说排序算法
3-
categories: ['algorithm']
4-
tags: ['algorithm', 'sort']
5-
date: 2015-03-03 17:37
6-
---
7-
81
# 细说排序算法
92

103
> :notebook: 本文已归档到:「[blog](https://github.com/dunwu/blog/tree/master/source/_posts/algorithm)
@@ -73,7 +66,7 @@ date: 2015-03-03 17:37
7366

7467
假设有一个大小为 N 的无序序列。冒泡排序就是要每趟排序过程中通过两两比较,找到第 i 个小(大)的元素,将其往上排。
7568

76-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/bubble-sort.png"/></div>
69+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/bubble-sort.png"/></div>
7770

7871
以上图为例,演示一下冒泡排序的实际流程:
7972

@@ -216,7 +209,7 @@ public void bubbleSort_2(int[] list) {
216209

217210
详细的图解往往比大堆的文字更有说明力,所以直接上图:
218211

219-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/quick-sort.png"/></div>
212+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/quick-sort.png"/></div>
220213

221214
上图中,演示了快速排序的处理过程:
222215

@@ -321,7 +314,7 @@ private void quickSort(int[] list, int left, int right) {
321314

322315
在讲解直接插入排序之前,先让我们脑补一下我们打牌的过程。
323316

324-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/insert-sort.png"/></div>
317+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/insert-sort.png"/></div>
325318

326319
- 先拿一张 5 在手里,
327320
- 再摸到一张 4,比 5 小,插到 5 前面,
@@ -421,7 +414,7 @@ public void insertSort(int[] list) {
421414

422415
我们来通过演示图,更深入的理解一下这个过程。
423416

424-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/shell-sort.png"/></div>
417+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/shell-sort.png"/></div>
425418

426419
在上面这幅图中:
427420

@@ -527,7 +520,7 @@ Donald Shell 最初建议步长选择为 N/2 并且对步长取半直到步长
527520

528521
**核心代码**
529522

530-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/selection-sort.png"/></div>
523+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/selection-sort.png"/></div>
531524

532525
### 算法分析
533526

@@ -581,7 +574,7 @@ Donald Shell 最初建议步长选择为 N/2 并且对步长取半直到步长
581574

582575
其中 i=1,2,…,n/2 向下取整;
583576

584-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/heap-sort.png"/></div>
577+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/heap-sort.png"/></div>
585578

586579
如上图所示,序列 R{3, 8,15, 31, 25} 是一个典型的小根堆。
587580

@@ -615,13 +608,13 @@ Donald Shell 最初建议步长选择为 N/2 并且对步长取半直到步长
615608

616609
设有一个无序序列 { 1, 3,4, 5, 2, 6, 9, 7, 8, 0 }。
617610

618-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/heap-sort-02.png"/></div>
611+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/heap-sort-02.png"/></div>
619612

620613
构造了初始堆后,我们来看一下完整的堆排序处理:
621614

622615
还是针对前面提到的无序序列 { 1,3, 4, 5, 2, 6, 9, 7, 8, 0 } 来加以说明。
623616

624-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/heap-sort-03.png"/></div>
617+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/heap-sort-03.png"/></div>
625618

626619
相信,通过以上两幅图,应该能很直观的演示堆排序的操作处理。
627620

@@ -790,7 +783,7 @@ public void Merge(int[] array, int low, int mid, int high) {
790783

791784
掌握了合并的方法,接下来,让我们来了解**如何分解**
792785

793-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/merge-sort.png"/></div>
786+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/merge-sort.png"/></div>
794787

795788
在某趟归并中,设各子表的长度为 **gap**,则归并前 R[0...n-1] 中共有 **n/gap** 个有序的子表:`R[0...gap-1]`, `R[gap...2*gap-1]`, ... , `R[(n/gap)*gap ... n-1]`
796789

@@ -884,7 +877,7 @@ public int[] sort(int[] list) {
884877

885878
我们先根据序列的个位数的数字来进行分类,将其分到指定的桶中。例如:R[0] = 50,个位数上是 0,将这个数存入编号为 0 的桶中。
886879

887-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/algorithm/sort/radix-sort.png"/></div>
880+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/algorithm/sort/radix-sort.png"/></div>
888881

889882
分类后,我们在从各个桶中,将这些数按照从编号 0 到编号 9 的顺序依次将所有数取出来。
890883

docs/coverpage.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<div align="center"><img width="100px" src="http://dunwu.test.upcdn.net/images/others/zp.png"/></div>
2+
3+
# Algorithm Tutorial
4+
5+
> 算法和数据结构教程
6+
7+
[开始阅读](README.md)

docs/data-structure/array.md

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
---
2-
title: 数组
3-
date: 2015-04-10 18:46
4-
categories: ['algorithm','data-structure']
5-
tags: ['data-structure', 'array']
6-
---
7-
81
# 数组
92

103
> 所谓数组,是有序的元素序列。若将有限个类型相同的变量的集合命名,那么这个名称为数组名。组成数组的各个变量称为数组的分量,也称为数组的元素,有时也称为下标变量。用于区分数组的各个元素的数字编号称为下标。数组是在程序设计中,为了处理方便, 把具有相同类型的若干元素按无序的形式组织起来的一种形式。这些无序排列的同类数据元素的集合称为数组。
@@ -33,7 +26,7 @@ tags: ['data-structure', 'array']
3326

3427
这里有一个例子:
3528

36-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/data-structure/array/一维数组.png"/></div>
29+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/data-structure/array/一维数组.png"/></div>
3730

3831
在上面的例子中,数组 A 中有 6 个元素。也就是说,A 的长度是 6 。我们可以使用 A[0] 来表示数组中的第一个元素。因此,A[0] = 6 。类似地,A[1] = 3,A[2] = 8,依此类推。
3932

@@ -49,15 +42,15 @@ tags: ['data-structure', 'array']
4942

5043
下图显示了*大小为 M \* N 的数组 A* 的实际结构:
5144

52-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/data-structure/array/C++二维数组.png"/></div>
45+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/data-structure/array/C++二维数组.png"/></div>
5346

5447
因此,如果我们将 A 定义为也包含 _M \* N_ 个元素的一维数组,那么实际上 A[i][j] 就等于 A[i * N + j]
5548

5649
**2. 在 Java 中,二维数组实际上是包含着 M 个元素的一维数组,每个元素都是包含有 N 个整数的数组。**
5750

5851
下图显示了 Java 中二维数组 A 的实际结构:
5952

60-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/data-structure/array/JAVA二维数组.png"/></div>
53+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/data-structure/array/JAVA二维数组.png"/></div>
6154

6255
二维数组示例:
6356

docs/data-structure/graph.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
---
2-
title:
3-
date: 2015-03-24 15:31
4-
categories: ['algorithm','data-structure']
5-
tags: ['data-structure', 'graph']
6-
---
7-
81
#
92

103
在计算机科学中,一个图就是一些*顶点*的集合,这些顶点通过一系列**结对(连接)。顶点用圆圈表示,边就是这些圆圈之间的连线。顶点之间通过边连接。
114

12-
<div align="center"><img src="https://raw.githubusercontent.com/dunwu/images/master/images/data-structure/graph/graph.png"/></div>
5+
<div align="center"><img src="https://gitee.com/turnon/images/raw/master/images/data-structure/graph/graph.png"/></div>
136

147
## 术语
158

0 commit comments

Comments
 (0)