This repository contains Sorting Algorithms which are written in C++. This includes most of the run-time libraries and a custom header for each algorithm. The purpose of these algorithms is to to swap two numbers by using the mentioned algorithm. The algorithms being used are: bubble sort, which goes through an array, compares adjacent items, and swaps them if they are in the wrong order. Another algorithm , but is less efficient, is insertion sort. Numerous iterations are made, as the final sorted array is built one at a time. A third algorithm is merge sort, which cuts the array in half, sorts each half, and then will combine again at the end for a sorted array. Fourth is quick sort. Quick sort, similar to merge sort, divides the array, then recursively is called, and the result is a sorted array. Lastly, selection sort is an algorithm where the minimum value in an array is repeatedly found from an unsorted array, and that minimum value is moved to the start of the array.
Feel free to visit these links below to compare the different algorithms.
Of course you will need a cpp compiler to do the job, so you can install the MinGW to do it in Windows or any other you want.
- Add compilation steps for different OS's