//快速排序: #include <stdio.h> #define MAX 500000 int s[MAX]; void Q_Sort(int start,int end) { int i,j,t; if ( start >= end ) return ; t = s[start]; i = start; j = end; while ( i < j) { while ( s[j] >= t && i < j) { j--; } s[i] = s[j…
2.3 归并排序 接口定义: int merge(void* data, int esize, int lpos, int dpos, int rpos, int (*compare)(const void* key1, const void* key2)); 返回值:成功 0:失败 -1. int merge_sort(void* data, int size, int esize, int lpos, int rpos, int (*compare)(const void* key1, co…