Computers are often used to sort large amounts of data. Though this may seem like a simple task to complete, a lot of research has focused on finding the most effective algorithms to sort large amount of data.
Four of the most basic algorithms to sort a set of data are:
- Insertion Sort Algorithm,
- Bubble Sort Algorithm,
- Selection Sort Algorithm,
- Merge Sort Algorithm.
We have implemented each these algorithms below, using Python to sort a set list of values.
Insertion SortBubble SortSelection SortMerge Sort
Insertion Sort
The insertion sort is an iterative algorithm (using nested loops).
Bubble Sort
The Bubble sort is an iterative algorithm (using nested loops).
Selection Sort
The selection sort is an iterative algorithm (using nested loops).
Merge Sort
The merge sort algorithm uses a recursive function.