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:
- The output
is in non decreasing order (each element is no smaller than the previous
element according to the desired total
order); - The output
is a permutation (reordering) of the input.
We can divide
sorting two types
- Internal
sorting: If the number of objects / elements is small enough to fits into the
main memory then it is called internal sorting. - 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:
Learn Bucket Sort
Learn Bubble Sort
Learn Insertion sort
Learn Selection Sort
Learn Heap sort
Learn Merge Sort