A sorting algorithm is a technique used to arrange large numbers of records
in a sorting scheme.In such a sorting scheme, the order of the listed records or objects
may be by recency, alphabetically, by object size, by locations, prices, or by many other factors. A sorting algorithm may be based on one or more criteria, and 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. A complex example of sorting algorithms are search engineresults pages, which incorporate hundreds of different factors and many algorithms.