sort.c
changeset 27 81a574d60c15
parent 25 6cf883f9c506
child 29 7abf6146898e
equal deleted inserted replaced
26:d227047a3e88 27:81a574d60c15
    11 #ifndef MAX
    11 #ifndef MAX
    12 #define MAX 50000
    12 #define MAX 50000
    13 #endif
    13 #endif
    14 
    14 
    15 unsigned long counter = 0;
    15 unsigned long counter = 0;
       
    16 
    16 unsigned long iters = 0;
    17 unsigned long iters = 0;
    17 
    18 
    18 int compare (int *a, int *b)
    19 int compare (int *a, int *b)
    19 {
    20 {
    20     iters++;
    21     iters++;
    74 }
    75 }
    75 
    76 
    76 int main (int argc, char **argv)
    77 int main (int argc, char **argv)
    77 {
    78 {
    78     int a[MAX];
    79     int a[MAX];
       
    80 
    79     int b[MAX];
    81     int b[MAX];
       
    82 
    80     int c[MAX];
    83     int c[MAX];
       
    84 
    81     int i;
    85     int i;
    82 
    86 
    83     srand (time (NULL));
    87     srand (time (NULL));
    84 
    88 
    85     for (i = 0; i < MAX; i++) {
    89     for (i = 0; i < MAX; i++) {