We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5cea2b1 + a9e98c1 commit f855f72Copy full SHA for f855f72
content/russian/cs/sorting/selection.md
@@ -1,6 +1,7 @@
1
---
2
title: Сортировка выбором
3
weight: 2
4
+published: true
5
6
7
Похожим методом является **сортировка выбором** (минимума или максимума).
@@ -10,7 +11,7 @@ weight: 2
10
11
```cpp
12
void selection_sort(int *a, int n) {
13
for (int k = 0; k < n - 1; k++)
- for (j = k + 1; j < n; j++)
14
+ for (int j = k + 1; j < n; j++)
15
if (a[k] > a[j])
16
swap(a[j], a[k]);
17
}
0 commit comments