Add an implementation of a sorting algorithm to avoid overhead
of qsort.