-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.c
More file actions
37 lines (26 loc) · 708 Bytes
/
main.c
File metadata and controls
37 lines (26 loc) · 708 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include "sorting.h"
#include "esorting.h"
static void esort(void){
int num_ways = 10;
int run_size = 1000;
char input_file[] = "G:/temp/sort/input.txt";
char output_file[] = "G:/temp/sort/output.txt";
FILE* in = openFile(input_file, "w");
srand(time(NULL));
for (int i = 0; i < num_ways * run_size; i++)
fprintf(in, "%d ", rand());
fclose(in);
external_sort(input_file, output_file, num_ways,
run_size);
}
int main(void) {
// int array[] = {36, 4, 6, 3, 13, 0, 3, 5};
// bucket_sort(array, 8);
// print_array(array, 8);
esort();
return 0;
}