What is Sorting?

In computer science, a sorting algorithm is an algorithm that places elements in a list in a specific order. The most commonly used order is numerical order and dictionary order. numerical order can be increasing Order or decreasing ,and similarly dictionary order can also be increasing or decreasing.

Reason to Sort

Efficient sorting is very important for optimizing the efficiency of other algorithms (such as search and merge algorithms) that require input data to be in a sorted list. Sorting can often also be used to normalize data and produce human-readable output.Sorting is an output of the inputs permutations.

Numerical Sorting

Example:

Numerical Sorting can be in increasing or decreasing order.

Dictionary Sorting

It is also called lexical order, alphabetical order.In this sorting we compare every alphabets.
Example :


Leave a Reply

Your email address will not be published. Required fields are marked *