27 lines
502 B
C
27 lines
502 B
C
#ifndef HEAD
|
|
#define HEAD
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
//#include <sys/time.h>
|
|
|
|
#define AVG_TIME_LOOPS 5000
|
|
#define AVG_RAND_MAX 10000000
|
|
#define MILLION 1000000
|
|
|
|
double wtime();
|
|
unsigned long long rdtsc();
|
|
int get_rand(int min, int max);
|
|
void fill_rand(int *arr, int n);
|
|
void merge_sort(int *arr, int n);
|
|
|
|
int linear_Search(int *arr, int n, int key);
|
|
int exponential_Search(int *arr, int n, int key);
|
|
int binary_Search(int *arr, int n, int key);
|
|
|
|
void run_exp1();
|
|
void run_exp2();
|
|
|
|
#endif
|
|
|