Ads by Google
Christian Borgelt's Web Pages

Sort - Sorting Algorithms

Download

sort.zip (22 kb) sort.tar.gz (20 kb) C sources, version 1.3 (2014.10.24)

Description

C implementations of several sorting algorithms (bubble sort, selection sort, insertion sort, Shell sort, merge sort, heap sort, smooth sort, quick sort, bin/radix sort) for arrays of floating point numbers. These implementations are meant for educational purposes. Apart from the actual sorting program, there is a program that constructs sequences that are difficult to sort for quicksort (that is, lead to the worst case behavior of O(n2)) with different choices of the pivot element as well as an auxiliary program that simply generates lists of random numbers, which can be fed into the sorting program to compare the speed of the sorting algorithms.