Sorting
Algorithms
are used to sort a data structure according to a specific order relationship,
such as numerical order or lexicographical order. |
|
There are currently hundreds of different sorting algorithms, each with its own specific
characteristics. They are classified according to two metrics: space complexity and time
complexity. Space and time complexity can also be further subdivided into 3 different
cases: best
case, average case and worst case.
Most of them fall into two categories:
1. Logarithmic
The complexity is proportional to the binary logarithm (i.e to the base 2) of n.
2. Quadratic
The complexity is proportional to the square of n.
Happy Visualising!