Update bubble sort (C) and insertion sort (C).

This commit is contained in:
Yudong Jin
2023-01-06 03:31:58 +08:00
parent db79f81af8
commit 75217d5e8b
4 changed files with 9 additions and 17 deletions
+1 -2
View File
@@ -136,8 +136,7 @@ comments: true
```c title="insertion_sort.c"
/* 插入排序 */
void insertionSort(int nums[], int size)
{
void insertionSort(int nums[], int size) {
// 外循环:base = nums[1], nums[2], ..., nums[n-1]
for (int i = 1; i < size; i++)
{