Computers are often used to process large amounts of data. Some of the tasks they can be used for is to sort data sets 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: