Sorting is the operation of arranging the records of a table into some sequential order according to an ordering criterion.
A simple sorting algorithm typically consists of two operations:
Compare operation
Swap operation
Advantages of Sorting:
Data searching can be optimised
Improve readability
Processing of data is performed in a defined order
Sorting is classified into 2 variants:
In-place sorting
Not-in-place sorting
In-place sorting is an algorithm that does not need extra space and produces an output in the samememory that contains the data by transforming the inputted data.