Skip to content

Sorting

Sorting is one of the basic operation you can perform on a given collection of item. For sorting you need some basis of comparison and the order in which you want to sort.

A simple use of sorting is when you want to search form item many times you can sort them and then use binary search.

Also note that you cannot make a sorting algorithm with time complexity less than \(O(\log n)\) if we use the comparison model for computation.

Here is list of some common sorting algorithms: