Sorting

Sorting is a common operation in many applications, and efficient algorithms have been developed to perform it.

Sorting n-tuples (depending on context also called e.g. records consisting of fields) can be done based on one or more of its components.

For example, the items are books, the sort key is the title, subject or author, and the order is alphabetical.

For dates and times, ascending means that earlier values precede later ones e.g. 1/1/2000 will sort ahead of 1/1/2001.

Sorting results from the application of some criterion or differential stressors to a mass to separate it into its components based on some variable quality.

Manual typesetting required all of the type after use to be sorted back into the correct slots in the type case .
Workers sorting parcels in a postal facility
A railroad classification yard , used for sorting freight cars