AI engineering glossary · Data structures algorithms
What is sorting?
Sorting: Arranging items in a defined order, such as smallest to largest, by some key. Sorted data enables binary search, easy duplicate removal and merging, so it is a fundamental step in many algorithms.
Sorting: an example
Sorting exam scores [72, 88, 65] gives [65, 72, 88], and then the median is simply the middle value.
Related terms
More Data structures algorithms terms
- Space complexity
- Space-time trade-off
- Stable sort
- String matching
- Tabulation
- Time complexity
- Timsort
- Top-K problem
Where you learn it
Sorting is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.