24 lines
462 B
C
24 lines
462 B
C
#include "mergeSort.h"
|
|
|
|
#include <stdio.h>
|
|
#include <time.h>
|
|
#include <stdlib.h>
|
|
|
|
#define printlist(s, x) printf("%s = [", #x); for (int i = 0; i < s; ++i) { printf("%d, ", x[i]); } printf("\b\b]\n");
|
|
|
|
#define listSize 10000000
|
|
int list[listSize];
|
|
|
|
int main(void)
|
|
{
|
|
srand(time(NULL));
|
|
for (int i = 0; i < listSize; ++i) {
|
|
list[i] = rand();
|
|
}
|
|
/* printlist(listSize, list); */
|
|
|
|
margs_t args = {list, 0, 9};
|
|
merge_sort(&args);
|
|
printlist(listSize, list);
|
|
}
|