sort.c
changeset 29 7abf6146898e
parent 27 81a574d60c15
child 48 b94d657a9acb
equal deleted inserted replaced
28:54addf5893ef 29:7abf6146898e
    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 
       
    17 unsigned long iters = 0;
    16 unsigned long iters = 0;
    18 
    17 
    19 int compare (int *a, int *b)
    18 int compare (int *a, int *b)
    20 {
    19 {
    21     iters++;
    20     iters++;
    75 }
    74 }
    76 
    75 
    77 int main (int argc, char **argv)
    76 int main (int argc, char **argv)
    78 {
    77 {
    79     int a[MAX];
    78     int a[MAX];
    80 
       
    81     int b[MAX];
    79     int b[MAX];
    82 
       
    83     int c[MAX];
    80     int c[MAX];
    84 
    81 
    85     int i;
    82     int i;
    86 
    83 
    87     srand (time (NULL));
    84     srand (time (NULL));