mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-07 21:24:18 +00:00
Update bubble sort and insertion sort.
This commit is contained in:
@@ -119,7 +119,7 @@
|
||||
|
||||
## 算法流程
|
||||
|
||||
1. 首先,对原数组执行一次「哨兵划分」,得到待排序的左子数组和右子数组;
|
||||
1. 首先,对原数组执行一次「哨兵划分」,得到未排序的左子数组和右子数组;
|
||||
2. 然后,对左子数组和右子数组分别递归执行「哨兵划分」;
|
||||
3. 持续递归,直至子数组长度为 1 时终止,从而完成整个数组的排序;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user