# Some Discourse on Sorting

Sorting means to arrange the given list of data in any particular form or order. Generally sorting is done on the basis of numerical order and alphabetical or lexicographical order. Here we shall be discussing only the numerical order. In Computer Science, sorting has always been given special attention and interest because it is a vital part of many other fundamental processes. Still now, research is going on to improve the sorting techniques and numerous algorithms have been presented for this purpose. Some basic ones which are commonly used are selection sort, bubble sort, insertion sort, merge sort, shell sort, quick sort, etc.

A good sorting algorithm should at least have the following characteristics.

- It should be simple in nature, easy to understand and implement. Not very complex.
- It should utilize minimum of the system resources and memory.
- It should follow a fixed set of instructions rather than sorting by hit and trial method, like Bogosort. (Stupid Sort)
- It should consider well the best, worst and the average cases.

There are many scenarios for an Algorithm. Best or Ideal case of an algorithm means when the list is already sorted. Worst case means when the list is completely disarrayed, for example when we want to sort in viagraforhealthyman.com ascending order and the list is present in descending order, so itâ€™s the worst case. Average case means the normal conditions when there is some disorder as well some ordering in the list.

I shall try to elaborate some of the popular sorting Algorithms one by one to you in the upcoming posts. So stay tuned!!!

Tags: algorithms, c++, cprogramming, sorting