A collection of sorting and merging functions written in ANSI C

Source code is in the srtseq directory for sorting functions and mrgseq for merging functions. Some functions start with a g and are generic functions with an interface similar to that of qsort. Thus key comparisons utilize a compare function.

Some functions start with a d and use a data typedef to define a primitive data type. Thus key comparisons then utilize <, >, as needed. You might also find f functions or relics for double of float data types: ignore them as they are superseded by the d functions.

There is a variety of insertion sort implementation using for-while or for-for structures. Quicksort implementations are recursive or not and some of them include inline insertion sort. Thoroughly test them before you use them!

A Repository directory contains prior generation functions or other functions not available in srtseq (eg selection sort, shell sort etc). It is possible that some of those Repository functions are buggy or do not work at all. By default be cautious or ignore them.

The mrgseq directory contains merging code. Functions use a standard while loop implementation or even a for loop implementation.

Drivers for testing them are available in the two directories mentioned: a dmain.c, gmain.c, etc. The main source code allows use to select or deselect functions (by turning a zero into a one or the other way around).

  1. 20ssmV01d.tar It creates a directory 20ssm and then populates it. Start by reading 20ssm.txt. The makefile to use is Makefile.sm. The term ssm means sequential sorting and merging.
  2. 20ssmV01.tar It doesnot create a directory but populates the current directory with files and subdirectories! Avoid it.

Last Update: Aug 12, 2020