Update punctuation

This commit is contained in:
krahets
2023-08-27 23:40:39 +08:00
parent c5a7323817
commit 57851ab11e
50 changed files with 100 additions and 100 deletions
+2 -2
View File
@@ -188,6 +188,6 @@
## 算法特性
- **时间复杂度为 $O(n^2)$ 、自适应排序** :各轮“冒泡”遍历的数组长度依次为 $n - 1$ , $n - 2$ , $\dots$ , $2$ , $1$ ,总和为 $(n - 1) n / 2$ 。在引入 `flag` 优化后,最佳时间复杂度可达到 $O(n)$ 。
- **空间复杂度为 $O(1)$ 、原地排序**:指针 $i$ , $j$ 使用常数大小的额外空间。
- **时间复杂度为 $O(n^2)$、自适应排序**:各轮“冒泡”遍历的数组长度依次为 $n - 1$$n - 2$$\dots$、$2$、$1$ ,总和为 $(n - 1) n / 2$ 。在引入 `flag` 优化后,最佳时间复杂度可达到 $O(n)$ 。
- **空间复杂度为 $O(1)$、原地排序**:指针 $i$ $j$ 使用常数大小的额外空间。
- **稳定排序**:由于在“冒泡”中遇到相等元素不交换。