Polish the chapter

introduction, computational complexity.
This commit is contained in:
krahets
2023-08-20 14:51:39 +08:00
parent 5fb728b3d6
commit 2626de8d0b
87 changed files with 375 additions and 371 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
2. 选取区间 $[0, n-1]$ 中的最小元素,将其与索引 $0$ 处元素交换。完成后,数组前 1 个元素已排序。
3. 选取区间 $[1, n-1]$ 中的最小元素,将其与索引 $1$ 处元素交换。完成后,数组前 2 个元素已排序。
4. 以此类推。经过 $n - 1$ 轮选择与交换后,数组前 $n - 1$ 个元素已排序。
5. 仅剩的一个元素必定是最大元素,无排序,因此数组排序完成。
5. 仅剩的一个元素必定是最大元素,无排序,因此数组排序完成。
=== "<1>"
![选择排序步骤](selection_sort.assets/selection_sort_step1.png)