diff --git a/docs/notes/pics/10.gif b/docs/notes/pics/10.gif
index d52a911e..df380209 100644
Binary files a/docs/notes/pics/10.gif and b/docs/notes/pics/10.gif differ
diff --git a/docs/notes/pics/101550406418006.gif b/docs/notes/pics/101550406418006.gif
new file mode 100644
index 00000000..df380209
Binary files /dev/null and b/docs/notes/pics/101550406418006.gif differ
diff --git a/docs/notes/pics/11.gif b/docs/notes/pics/11.gif
index 5d9c6f00..ce296a05 100644
Binary files a/docs/notes/pics/11.gif and b/docs/notes/pics/11.gif differ
diff --git a/docs/notes/pics/111550407277293.gif b/docs/notes/pics/111550407277293.gif
new file mode 100644
index 00000000..ce296a05
Binary files /dev/null and b/docs/notes/pics/111550407277293.gif differ
diff --git a/docs/notes/pics/11_200.png b/docs/notes/pics/11_200.png
new file mode 100644
index 00000000..42966322
Binary files /dev/null and b/docs/notes/pics/11_200.png differ
diff --git a/docs/notes/pics/121550407878282.gif b/docs/notes/pics/121550407878282.gif
new file mode 100644
index 00000000..5a17a553
Binary files /dev/null and b/docs/notes/pics/121550407878282.gif differ
diff --git a/docs/notes/pics/81550405360028.gif b/docs/notes/pics/81550405360028.gif
new file mode 100644
index 00000000..7960c782
Binary files /dev/null and b/docs/notes/pics/81550405360028.gif differ
diff --git a/docs/notes/pics/8_200.png b/docs/notes/pics/8_200.png
new file mode 100644
index 00000000..af9d663a
Binary files /dev/null and b/docs/notes/pics/8_200.png differ
diff --git a/docs/notes/pics/9.gif b/docs/notes/pics/9.gif
index f81aa264..2409a299 100644
Binary files a/docs/notes/pics/9.gif and b/docs/notes/pics/9.gif differ
diff --git a/docs/notes/pics/91550405374894.gif b/docs/notes/pics/91550405374894.gif
new file mode 100644
index 00000000..2409a299
Binary files /dev/null and b/docs/notes/pics/91550405374894.gif differ
diff --git a/docs/notes/pics/9_200.png b/docs/notes/pics/9_200.png
new file mode 100644
index 00000000..4cf0f56d
Binary files /dev/null and b/docs/notes/pics/9_200.png differ
diff --git a/docs/notes/算法.md b/docs/notes/算法.md
index 40b6cd5d..b16e79b0 100644
--- a/docs/notes/算法.md
+++ b/docs/notes/算法.md
@@ -646,7 +646,7 @@ public T select(T[] nums, int k) {
堆可以用数组来表示,这是因为堆是完全二叉树,而完全二叉树很容易就存储在数组中。位置 k 的节点的父节点位置为 k/2,而它的两个子节点的位置分别为 2k 和 2k+1。这里不使用数组索引为 0 的位置,是为了更清晰地描述节点的位置关系。
-
+
```java
public class Heap> {
@@ -682,7 +682,7 @@ public class Heap> {
在堆中,当一个节点比父节点大,那么需要交换这个两个节点。交换后还可能比它新的父节点大,因此需要不断地进行比较和交换操作,把这种操作称为上浮。
-
+
```java
private void swim(int k) {
@@ -695,7 +695,7 @@ private void swim(int k) {
类似地,当一个节点比子节点来得小,也需要不断地向下进行比较和交换操作,把这种操作称为下沉。一个节点如果有两个子节点,应当与两个子节点中最大那个节点进行交换。
-
+
```java
private void sink(int k) {
@@ -744,15 +744,13 @@ public T delMax() {
无序数组建立堆最直接的方法是从左到右遍历数组进行上浮操作。一个更高效的方法是从右至左进行下沉操作,如果一个节点的两个节点都已经是堆有序,那么进行下沉操作可以使得这个节点为根节点的堆有序。叶子节点不需要进行下沉操作,可以忽略叶子节点的元素,因此只需要遍历一半的元素即可。
-
+
#### 5.2 交换堆顶元素与最后一个元素
交换之后需要进行下沉操作维持堆的有序状态。
-
-
-
+
```java
public class HeapSort> extends Sort {
@@ -2045,7 +2043,7 @@ public class Transaction {
对于 N 个键,M 条链表 (N>M),如果哈希函数能够满足均匀性的条件,每条链表的大小趋向于 N/M,因此未命中的查找和插入操作所需要的比较次数为 \~N/M。
-
+
### 3. 线性探测法
@@ -2053,7 +2051,7 @@ public class Transaction {
使用线性探测法,数组的大小 M 应当大于键的个数 N(M>N)。
-
+
```java
public class LinearProbingHashST implements UnorderedST {
@@ -2154,7 +2152,7 @@ public void delete(Key key) {
线性探测法的成本取决于连续条目的长度,连续条目也叫聚簇。当聚簇很长时,在查找和插入时也需要进行很多次探测。例如下图中 2\~5 位置就是一个聚簇。
-
+
α = N/M,把 α 称为使用率。理论证明,当 α 小于 1/2 时探测的预计次数只在 1.5 到 2.5 之间。为了保证散列表的性能,应当调整数组的大小,使得 α 在 [1/4, 1/2] 之间。
diff --git a/docs/pics/10.gif b/docs/pics/10.gif
index d52a911e..df380209 100644
Binary files a/docs/pics/10.gif and b/docs/pics/10.gif differ
diff --git a/docs/pics/101550406418006.gif b/docs/pics/101550406418006.gif
new file mode 100644
index 00000000..df380209
Binary files /dev/null and b/docs/pics/101550406418006.gif differ
diff --git a/docs/pics/11.gif b/docs/pics/11.gif
index 5d9c6f00..ce296a05 100644
Binary files a/docs/pics/11.gif and b/docs/pics/11.gif differ
diff --git a/docs/pics/111550407277293.gif b/docs/pics/111550407277293.gif
new file mode 100644
index 00000000..ce296a05
Binary files /dev/null and b/docs/pics/111550407277293.gif differ
diff --git a/docs/pics/11_200.png b/docs/pics/11_200.png
new file mode 100644
index 00000000..42966322
Binary files /dev/null and b/docs/pics/11_200.png differ
diff --git a/docs/pics/121550407878282.gif b/docs/pics/121550407878282.gif
new file mode 100644
index 00000000..5a17a553
Binary files /dev/null and b/docs/pics/121550407878282.gif differ
diff --git a/docs/pics/81550405360028.gif b/docs/pics/81550405360028.gif
new file mode 100644
index 00000000..7960c782
Binary files /dev/null and b/docs/pics/81550405360028.gif differ
diff --git a/docs/pics/8_200.png b/docs/pics/8_200.png
new file mode 100644
index 00000000..af9d663a
Binary files /dev/null and b/docs/pics/8_200.png differ
diff --git a/docs/pics/9.gif b/docs/pics/9.gif
index f81aa264..2409a299 100644
Binary files a/docs/pics/9.gif and b/docs/pics/9.gif differ
diff --git a/docs/pics/91550405374894.gif b/docs/pics/91550405374894.gif
new file mode 100644
index 00000000..2409a299
Binary files /dev/null and b/docs/pics/91550405374894.gif differ
diff --git a/docs/pics/9_200.png b/docs/pics/9_200.png
new file mode 100644
index 00000000..4cf0f56d
Binary files /dev/null and b/docs/pics/9_200.png differ