### Related Articles

In this blog I am going to discuss about sorting, what is sorting and how many types of sorting techniques we have. Sorting is technique to arrange the elements in an order either ascending or descending.

The most-used orders are numerical order and lexicographical order. Efficient sorting is important for optimizing the use of other algorithms (such as search and merge algorithms) which require input data to be in sorted lists; it is also often useful for canonicalizing data and for producing human-readable output. More formally, the output must satisfy two conditions:

1. The output is in non decreasing order (each element is no smaller than the previous element according to the desired total order);

2. The output is a permutation (reordering) of the input.

**We can divide sorting two types**

1. Internal sorting: If the number of objects / elements is small enough to fits into the main memory then it is called internal sorting.

2. External Sorting: If the number of objects so large that some of them reside on external storage during the sort, it is called External sorting.

**Types of sort’s:**

See the Merge Sort here

See the Bubble Sort here

See the Insertion sort here

See the Selection Sort here

See the Heap sort here

See the Bucket Sort here