A sorting algorithm is a procedure with which extensive data records can be arranged in a sorting scheme.
In such a sorting scheme, the order of listed records or objects can be by recency, alphabetically, by object size, by locations, prices, or by many other factors. A sorting algorithm can be based on one or more criteria.
The various techniques used in sorting records compare records listed side by side according to the selected criteria and swap out records that are incorrectly matched in order to ensure the selection criteria are met. A complex example of sorting algorithms are search engine results pages, which incorporate hundreds of different factors and many algorithms.