Computers are often used to process a large amount of data. Some of the tasks they can used for is to sort this data in order, e.g. numerical order or alphabetical order.
Though this may seem like a simple task to complete, a lot of research has focused on finding the most effective approach to sort a list very effectively.
Different solutions have been developed resulting on a range of sorting algorithms, the most popular once being:
- Bubble Sort Algorithm,
- Insertion Sort Algorithm,
- Selection Sort Algorithm,
- Merge Sort Algorithm,
- Quick Sort Algorithm.
The effectiveness of an algorithm results in the number of steps it takes to complete a task.
For sorting algorithms, the effectiveness of an algorithm is not just based on the algorithm itself but also on the list of data to be sorted. Some algorithms for instance will be more effective than other on small lists but not on large lists. Some algorithms will be more effective than others if the data is already nearly sorted. Some algorithms such as the merge sort algorithm will be more effective in a concurrent-processing environment as they use a divide and conquer approach.
The following animations are a visual representation of six of the key sorting algorithms: