Sorting Technique

                                                                 Sorting Technique

Home

Sorting is a process of arranging list of element in ascending or descending order.

Sorting always works on collection of list elements i.e Array, List(java).  We can sort the elements in two different order either ascending or descending. 

Sorting is the process of placing elements from a collection in some kind of order. For example, a list of words could be sorted alphabetically or by length. A list of cities could be sorted by population, by area, or by zip code. 

Binary Search will always works on Sorted elements. 

Before getting into specific algorithms, we should think about the operations that can be used to analyze a sorting process. First, it will be necessary to compare two values to see which is smaller (or larger). In order to sort a collection, it will be necessary to have some systematic way to compare values to see if they are out of order. The total number of comparisons will be the most common way to measure a sort procedure. Second, when values are not in the correct position with respect to one another, it may be necessary to exchange them. This exchange is a costly operation and the total number of exchanges will also be important for evaluating the overall efficiency of the algorithm.

Below are the some important sorting  technique...

1) Insertion sorting
2) Selection sorting
3) Radix sorting
4) Bubble sorting
5) Merge sorting
6) Shell sort


****
I will update very soon all mentioned sorting technique with java example. 


Thanks,


Comments

Popular posts from this blog

Insertion Sort

What is Selection Sort? And how it works?