Here's an overview of introductory sorting algorithms including selection sort, bubble sort, and insertion sort.
What is sorting?
Sorting is any process of arranging items systematically. In computer science, sorting algorithms put elements of a list in a specific order.
The most frequently used orders are numerical (according to numbers) and lexicographical (according to letters). Efficient sorting is essential for optimizing the efficiency of other algorithms that require sorted inputs or sort given inputs as part of their process.
Formal definition
A list or array of size n is sorted in ascending order if , such that , ...