Sorting Algorithm

Posts tagged Sorting Algorithm

Quick Sort using C

Introduction Quick sort or quicksort (sometimes called partition-exchange sort) is an efficient and very fast sorting algorithm for internal sorting, serving as a systematic method for placing the…

Bubble Sort using C

Introduction Bubble sort is one of the most popular sorting methods. It can be treated as a selection sort because it is based on successively selecting the smallest…

Straight Selection Sort using C

Selection sorting refers to a class of algorithms for sorting a list of items using comparisons. These algorithms select successively smaller or larger items from the list and…

Simple Selection Sort using C

The simplest possible technique based on the principle of repeated selection makes use of “n” passes over an array elements. In the i-th pass, the i-th smallest element…

Shell Sort using C

I will show here an example on shell sort (invented by Donald Shell) using C programming language. This method makes repeated use of straight insertion or shuttle sort.…

Straight Insertion Sort using C

Insertion sort is a simple sorting algorithm that builds the final sorted array (or list) one item at a time. More details can be found here at https://en.wikipedia.org/wiki/Insertion_sort…

Shuttle Sort using C

In Shuttle Sort technique for n elements in an array a, it requires n-1 passes. When i-th pass(1<=i<=n) begins, the first i elements, i.e., elements a[0] to a[i-1]…