此函数为一趟排序 num 为间隔 arraylen 为数组长度***/ void sellsortInsert(int array[][COL], int num, int arraylen){ int i, j;int temp;int *p = array[0];for (i = 0; i + num < arraylen; ++i){ if (p[i] < p[i + num]){ temp = p[i];p[i] = p[i + n...
include <stdio.h>#include <string.h>#define N 5 //定义符号常量#define MAX_LEN 100 //字符串最大长度 void selectSort(char (*pt)[MAX_LEN],int n) //形参pt为指向二维字符数组的指针{ int i,j,k; char tmp[MAX_LEN]; //临时字符数组 for(i=0;i<n-1;i++)...
-将M*N的二维数组中的数据,按行依次放入一维数组, //函数fun功能是将带头节点的单向链表结点域中的数据从小到大排序。 //相当于数组的冒泡排序。 1#include <stdio.h>2#include <stdlib.h>3#defineN 64typedefstructnode {5intdata;6structnode *next;7} NODE;8voidfun(NODE *h)9{ NODE *p, *q;intt...