功能要求如下:
排序算法比较: shellsort, quicksort, heapsort, mergesort 的算法实现 ,
对同样数据集的排序时间比较。
源代码:
# include stdio.h
# include time.h
# define MAXSIZE 2000
typedef struct{
int key[MAXSIZE];
int length;
}list;
long int compCount;
long int shiftCount;
void menu(int *m)/*retun m*/
{
int i;
char menu[6][15]={"1 CREATE ","2 IMPORT ","3 SORT","4 SHOW RESULT",
"5 SAVE RESULT","6 EXIT"};
clrscr();
printf("SORT COMPARE SYSTEM\n");
...[ 查看全文 ]