sorting algorithm

An algorithm that rearranges items into order, such as smallest to largest or alphabetical.

In more detail

Sorting is one of the most common operations in software, because sorted data allows binary search, range queries and easy duplicate removal. Algorithms differ in speed, extra memory, stability and behaviour on nearly sorted data. In Python you normally call sorted() or list.sort() rather than writing your own.

Related terms

Taught in

References