Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fafbfbf

Browse filesBrowse files
committed
bugfix
1 parent cdd9432 commit fafbfbf
Copy full SHA for fafbfbf

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎content/russian/cs/sorting/heapsort.md‎

Copy file name to clipboardExpand all lines: content/russian/cs/sorting/heapsort.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void heapsort(int* a, int n) {
2626
for (int i = 1; i <= n; i++) {
2727
// удаляем минимум, он останется в ячейке t[n + 1 - i]
2828
swap(t[1], t[n + 1 - i]);
29-
t_n++;
29+
t_n--;
3030
sift_down(1);
3131
}
3232
// получили массив t[1..n], в котором все элементы упорядочены по убыванию

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.