摘要:
```c/*Insertion SortAuthor: ZoroDate: 2019/11/7function: 插入排序*/#include void insert(int arr[], int n) { int key = arr[n]; int i = n; while (arr[i-1] > key) { arr[i] = arr[i-1]; ... 阅读全文
摘要:
```c /* Selection Sort Writed by Zoro Date: 2019/11/7 function:选择排序 3 7 4 2 6 1 3 1 4 2 6 7 3 1 4 2 6 7 3 1 2 4 6 7 1 2 3 4 6 7 */ #include int findMaxPos(int arr[], int n) { int max = arr[0]; int pos 阅读全文
摘要:
```c/*bubble.cwrite by Zorodate: 2019/11/7function: 冒泡排序*/#include void bubble(int arr[], int n) { int i; int tmp; for (i = 0; i arr[i+1]) { tmp = arr[i]; arr[i] = arr[... 阅读全文