quick.c C code for quicksort from http://linux.wku.edu/~lamonml/kb.html qs.c Same code adapted to return a count of comparisons. qs.h header for qs.c qs.o object file for compiled qs.c; see comments in qs_main.c qs_main.c Calls qs.c on lists of different lenghts and outputs the result. qs* executable for qs.c and qs_main.c run_qs Compile (qs_main.c, qs.c) to qs*; run it; output sent to qs.out qs.out Output from qs ---------------------------------- $ ./run_qs $ more qs.out # quicksort analysis # n count (n log(n)/count) 10 16 0.62 30 103 0.43 100 346 0.58 300 1861 0.40 1000 6540 0.46 3000 24620 0.42 10000 97981 0.41