This commit is contained in:
krahets
2023-03-26 04:45:23 +08:00
parent aedf4c4dff
commit 9253328b55
3 changed files with 151 additions and 33 deletions

View File

@@ -2,7 +2,7 @@
comments: true
---
# 11.7.   小结
# 11.8.   小结
- 冒泡排序通过交换相邻元素来实现排序。通过增加标志位实现提前返回,我们可将冒泡排序的最佳时间复杂度优化至 $O(N)$ 。
- 插入排序每轮将待排序区间内元素插入至已排序区间的正确位置,从而实现排序。插入排序的时间复杂度虽为 $O(N^2)$ ,但因为总体操作少而很受欢迎,一般用于小数据量的排序工作。