diff --git a/docs/notes/pics/2_200.png b/docs/notes/pics/2_200.png new file mode 100644 index 00000000..c292d4ef Binary files /dev/null and b/docs/notes/pics/2_200.png differ diff --git a/docs/notes/pics/3_200.png b/docs/notes/pics/3_200.png new file mode 100644 index 00000000..a35b29e4 Binary files /dev/null and b/docs/notes/pics/3_200.png differ diff --git a/docs/notes/pics/61550402057509.gif b/docs/notes/pics/61550402057509.gif new file mode 100644 index 00000000..7ba6f280 Binary files /dev/null and b/docs/notes/pics/61550402057509.gif differ diff --git a/docs/notes/算法.md b/docs/notes/算法.md index be3308a5..40b6cd5d 100644 --- a/docs/notes/算法.md +++ b/docs/notes/算法.md @@ -416,7 +416,7 @@ public class Shell> extends Sort { 归并排序的思想是将数组分成两部分,分别进行排序,然后归并起来。 -

+

### 1. 归并方法 @@ -511,7 +511,7 @@ public class Down2UpMergeSort> extends MergeSort { - 归并排序将数组分为两个子数组分别排序,并将有序的子数组归并使得整个数组排序; - 快速排序通过一个切分元素将数组分为两个子数组,左子数组小于等于切分元素,右子数组大于等于切分元素,将这两个子数组排序也就将整个数组排序了。 -

+

```java public class QuickSort> extends Sort { @@ -542,7 +542,7 @@ public class QuickSort> extends Sort { 取 a[l] 作为切分元素,然后从数组的左端向右扫描直到找到第一个大于等于它的元素,再从数组的右端向左扫描找到第一个小于它的元素,交换这两个元素。不断进行这个过程,就可以保证左指针 i 的左侧元素都不大于切分元素,右指针 j 的右侧元素都不小于切分元素。当两个指针相遇时,将切分元素 a[l] 和 a[j] 交换位置。 -

+

```java private int partition(T[] nums, int l, int h) { diff --git a/docs/pics/2_200.png b/docs/pics/2_200.png new file mode 100644 index 00000000..c292d4ef Binary files /dev/null and b/docs/pics/2_200.png differ diff --git a/docs/pics/3_200.png b/docs/pics/3_200.png new file mode 100644 index 00000000..a35b29e4 Binary files /dev/null and b/docs/pics/3_200.png differ diff --git a/docs/pics/61550402057509.gif b/docs/pics/61550402057509.gif new file mode 100644 index 00000000..7ba6f280 Binary files /dev/null and b/docs/pics/61550402057509.gif differ