Sorting

A sorting algorithm is an algorithm that puts elements of a list in a certain order. Comparison sorting algorithms compare pairs of elements and reorder them if needed, and require at least O(nlogn)O(n\log n) time. Non-comparison sorting algorithms use the internal character of the values to be sorted, and can typically only be used on lists with a small universe of elements. In exchange for their limited scope, they are able to improve on the O(nlogn)O(n\log n) runtime.