📄 test_quicksort.c
字号:
#include <stdio.h>
#include "quicksort.h"
#define SIZE 10000
void
ReadData( Sort S )
{
int i;
FILE *filep;
filep = fopen("data10000.txt", "r");
while(fscanf(filep, "%d", &i) != EOF)
Insert( i, S );
fclose(filep);
}
main()
{
Sort S;
S = Initialize( SIZE );
MakeEmpty( S );
ReadData( S );
printf("Number of comparisons by using quick sort: ");
Quicksort( S, SIZE );
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -