From e19269409b86f045d573ab4be261004e4baef76f Mon Sep 17 00:00:00 2001 From: Dagur624 <135330930+Dagur624@users.noreply.github.com> Date: Tue, 15 Apr 2025 21:28:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D1=83=D1=82=20=D0=B4=D0=BE=D0=BB=D0=B6?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=B1=D1=8B=D1=82=D1=8C=20=D0=B7=D0=BD=D0=B0?= =?UTF-8?q?=D0=BA=20"=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=B5",=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BD=D0=BE=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- content/russian/cs/sorting/insertion.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/russian/cs/sorting/insertion.md b/content/russian/cs/sorting/insertion.md index ffffbd01..19fa1e21 100644 --- a/content/russian/cs/sorting/insertion.md +++ b/content/russian/cs/sorting/insertion.md @@ -8,7 +8,7 @@ weight: 3 ```cpp void insertion_sort(int *a, int n) { for (int k = 1; k < n; k++) - for (int i = k; i > 0 && a[i - 1] < a[i]; i--) + for (int i = k; i > 0 && a[i - 1] > a[i]; i--) // мы ещё не дошли до начала массива и предыдущий элемент меньше swap(a[i], a[i - 1]); }