Wiki Merge sort was invented by John Von Neumann, a big name in computer science history. It is a divide and conquer algorithm. It sorts arrays by dividing them recursively into halves (divide) and then sorting and merging them back…
PHP Comb Sort
Wiki Shellsort was basically a generalisation of the Insertion sort, Comb sort is a generalisation of the Bubble sort. In the same way Shellsort was decreasing a gap between elements for subarrays been sent as input to the Insertion sort…
PHP Insertion Sort Algorithm
Wiki Insertion sort is another common sorting algorithm. To explain how it works, try to imagine this. There’s a couple of cards on the table and you want to sort them in a correct order. You will pick a card…
PHP Selection Sort Algorithm
Wiki Selection sort is another common sorting algorithm. You iterate n times over your list of numbers where n is the number of items in the list. In every iteration you find the minimum value in the list and switch…