Skip to content

Commit 778e336

Browse files
committed
添加归并排序图
1 parent 35ba1dc commit 778e336

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

notes/algorithms/基础排序算法.md

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
<!-- TOC -->
2+
- [进入算法的世界](#进入算法的世界)
3+
- [1. 冒泡排序](#1-冒泡排序)
4+
- [2. 选择排序](#2-选择排序)
5+
- [3. 插入排序](#3-插入排序)
6+
- [4. 归并排序](#4-归并排序)
7+
- [5. 快速排序](#5-快速排序)
8+
- [6. 希尔排序](#6-希尔排序)
9+
- [7. 基数排序](#7-基数排序)
10+
- [8. 桶排序](#8-桶排序)
11+
- [排序总结](#排序总结)
12+
13+
<!-- /TOC -->
14+
115
前言
216

317
- 深入总结八大排序算法以及相关的面试算法题
@@ -192,6 +206,9 @@ public class InsertionSort {
192206
- 自上而下的递归(所有递归的方法都可以用迭代重写,所以就有了第 2 种方法);
193207
- 自下而上的迭代;
194208

209+
![归并过程动态图](https://github.com/coderbruis/AlgorithmsInJava/blob/master/notes/pictures/mergeSort.gif)
210+
![分治思想](https://github.com/coderbruis/AlgorithmsInJava/blob/master/notes/pictures/1557906108-5066-20161218163120151-452283750.png)
211+
195212
```
196213
public class MergeSort {
197214
@@ -314,18 +331,12 @@ public void sort(int[] nums) {
314331
}
315332
```
316333

317-
318-
319334
#### 6. 希尔排序
320335

321336
#### 7. 基数排序
322337

323338
#### 8. 桶排序
324339

325-
326-
327-
328-
329340
#### 排序总结
330341

331342
| 排序名 | 时间复杂度 | 空间复杂度 | 优势 | 劣势 | 适用场景 | 稳定性 |

0 commit comments

Comments
 (0)