Bubble Sort, Algorithm Source Code for C/C++

Bubble sort is another simple algorithm which is suitable for sorting small amounts of data. It’s very easy to understand and learn so it’s a good start, but still one of the slower methods. That’s why it’s suitable only for small amount of data, in other cases it gets far behind competition of complex algorithms.

Input: a sequence […]

Selection Sort, Algorithm Source Code for C/C++

Selection sort is a very simple sorting algorithm which is very useful for sorting a small amount of data. It’s very easy to understand and learn so it’s a good start, but still one of the slower methods. That’s why it’s suitable only for small amount of data, in other cases it gets far […]

Insertion Sort, Algorithm Source Code for C/C++

Insertion sort is one of the most common sorting algorithms you’ll ever bump into. It is very simple and it takes time roughly equal to c*n2 to sort n items, where c is an undependable constant.Input: a sequence of n unsorted numbers.Output: a sequence of permuted n numbers from the input such that those numbers are sorted, most of the time, in decreasing order. 
How […]