
File:Merge_sort_animation.gif · Wikimedia Commons · See Wikimedia Commons
sorting algorithm
Sign in to saveAlso known as asc, desc, sort
algorithm that puts elements of a list in a certain order
A sorting algorithm is a step-by-step procedure that arranges items in a list into a specific order, such as from smallest to largest. Sorting matters because it makes data easier to work with and helps computers find information quickly.
AI-generated from the Wikipedia summary — may contain errors.
Wikidata facts
Show 6 more facts
- Commons category
- Sort algorithms
- topic's main category
- Category:Sorting algorithms
- Stack Exchange tag
- stackoverflow.com/tags/sorting
- topic has template
- Template:Sorting
- computes solution to
- sorting
- maintained by WikiProject
- WikiProject Mathematics
Sources (3)
via Wikidata · CC0
~33 min read
Encyclopedic overview
Merge sort
In computer science, a sorting algorithm is an algorithm that puts elements of a list into an order. The most frequently used orders are numerical order and lexicographical order, and either ascending order or descending order. Efficient sorting is important for optimizing the efficiency of other algorithms (such as search and merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for canonicalizing data and for producing human-readable output.
Excerpted from Wikipedia’s “sorting algorithm” article, available under the CC BY-SA 4.0 licence.