Skip to content

Commit e2fca3c

Browse files
committed
📖docs
1 parent 0f5ab8a commit e2fca3c

File tree

11 files changed

+785
-413
lines changed

11 files changed

+785
-413
lines changed

docs/.DS_Store

0 Bytes
Binary file not shown.

docs/.obsidian/core-plugins.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@
2727
"sync": false,
2828
"canvas": true,
2929
"bookmarks": true,
30-
"properties": false
30+
"properties": false,
31+
"webviewer": false
3132
}

docs/.obsidian/workspace.json

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@
4949
"title": "Dynamic-Programming"
5050
}
5151
},
52+
{
53+
"id": "56243bd84331da43",
54+
"type": "leaf",
55+
"state": {
56+
"type": "release-notes",
57+
"state": {
58+
"currentVersion": "1.8.9"
59+
},
60+
"icon": "lucide-book-up",
61+
"title": "Release Notes 1.8.9"
62+
}
63+
},
5264
{
5365
"id": "c7c1397df03f59cc",
5466
"type": "leaf",
@@ -88,7 +100,7 @@
88100
}
89101
}
90102
],
91-
"currentTab": 2
103+
"currentTab": 3
92104
}
93105
],
94106
"direction": "vertical"
@@ -107,7 +119,8 @@
107119
"state": {
108120
"type": "file-explorer",
109121
"state": {
110-
"sortOrder": "alphabetical"
122+
"sortOrder": "alphabetical",
123+
"autoReveal": false
111124
},
112125
"icon": "lucide-folder-closed",
113126
"title": "文件列表"
@@ -216,10 +229,12 @@
216229
"state": {
217230
"type": "outline",
218231
"state": {
219-
"file": "data-structure-algorithms/algorithm/Dynamic-Programming.md"
232+
"followCursor": false,
233+
"showSearch": false,
234+
"searchQuery": ""
220235
},
221236
"icon": "lucide-list",
222-
"title": "Dynamic-Programming 的大纲"
237+
"title": "大纲"
223238
}
224239
}
225240
],
@@ -239,8 +254,14 @@
239254
"command-palette:打开命令面板": false
240255
}
241256
},
242-
"active": "e24a131a4a8c13f9",
257+
"active": "56243bd84331da43",
243258
"lastOpenFiles": [
259+
"framework/SpringWebFlux/Webflux~.md",
260+
"framework/SpringWebFlux/Webflux.md",
261+
"framework/SpringWebFlux/Untitled.md",
262+
"framework/SpringWebFlux/响应式编程~.md",
263+
"framework/SpringWebFlux/SpringWebFlux~.md",
264+
"framework/SpringWebFlux/WebFlux~.md",
244265
"data-management/Redis/Redis-Datatype.md",
245266
"data-management/Redis/Redis-Database.md",
246267
"data-management/Redis/Nosql-Overview.md",
@@ -262,12 +283,6 @@
262283
"interview/Untitled.md",
263284
"data-structure-algorithms/data-structure/Binary-Tree.md",
264285
"data-structure-algorithms/soultion/DP-Solution.md",
265-
"data-structure-algorithms/algorithm/Sort.md",
266-
"data-structure-algorithms/algorithm/Greedy~.md",
267-
"data-structure-algorithms/algorithm/Greedy.md",
268-
"data-structure-algorithms/soultion/stock-problems.md",
269-
"data-management/MySQL/MySQL-Lock.md",
270-
"framework/SpringWebFlux/响应式编程.md",
271286
"Untitled.canvas",
272287
"data-structure-algorithms/algorithm",
273288
"data-structure-algorithms/未命名文件夹"
0 Bytes
Binary file not shown.

docs/data-structure-algorithms/algorithm/Sort.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public void insertionSort(int[] arr) {
177177

178178
1. **选择基准值**:从数组中选择一个元素作为基准值(pivot)。常见的选择方法有选取第一个元素、最后一个元素、中间元素或随机选取一个元素。
179179
2. **分区(Partition)**:遍历数组,将所有小于基准值的元素放在基准值的左侧,大于基准值的元素放在右侧。基准值放置在它的正确位置上。
180-
3. **递归排序**:对基准值左右两边的子数组分别进行递归排序,直到每个子数组的元素个数为0或1,此时数组已经有序。
180+
3. **递归排序**:对基准值左右两边的子数组分别进行递归排序,直到每个子数组的元素个数为 0 或 1,此时数组已经有序。
181181

182182
递归的最底部情形,是数列的大小是零或一,也就是数组都已经被排序好了。虽然一直递归下去,但是这个算法总会退出,因为在每次的迭代(iteration)中,它至少会把一个元素摆到它最后的位置去。
183183

@@ -262,10 +262,9 @@ private int partition(int[] arr, int low, int high) {
262262
$$
263263
(n - 1) + (n - 2) + \cdots + 1 = \frac{n(n - 1)}{2} = O(n^2)
264264
$$
265-
266-
267-
- 递归深度为 n-1 层,导致时间复杂度退化为 $O(n²)$
268-
265+
266+
- 递归深度为 n-1 层,导致时间复杂度退化为 $O(n²)$
267+
269268
- 平均情况时间复杂度:$O(n log n)$
270269
- **适用场景**:输入数据**随机分布**,基准值随机选取。
271270

@@ -398,7 +397,7 @@ public class MergeSort {
398397

399398
### 2. 动图演示
400399

401-
[![动图演示](https://github.com/hustcc/JS-Sorting-Algorithm/raw/master/res/heapSort.gif)](https://github.com/hustcc/JS-Sorting-Algorithm/blob/master/res/heapSort.gif)
400+
![](https://img2018.cnblogs.com/blog/1258817/201904/1258817-20190420150936225-1441021270.gif)
402401

403402
```java
404403
public class HeapSort {

0 commit comments

Comments
 (0)