Insertion Sort

This is the continuation of the last article on selection sort. Please check it if you didn’t read it yet. The last of the slow algorithms we will talk about is insertion sort. This is the best performing algorithm for small arrays. The idea is also very simple and like selection sort the array is… Continue reading Insertion Sort

Selection Sort

This is the continuation of the last article on bubble sort. If you didn’t read it you can read it clicking here. Another algorithm that is usually better than bubble sort is called selection sort. The idea is also very simple. You conceptually separate the list in two parts, the sorted one and the unsorted… Continue reading Selection Sort

Bubble Sort

This is the continuation of the previous article about the dynamic array data structure. If you didn’t read it you can read it clicking here. One of the prerequisites of doing a binary search is that the array or list has to be sorted. The algorithm that is usually taught as the first sorting algorithm… Continue reading Bubble Sort