Introduction to Sorting Algorithms
Sorting is nothing but arranging the data in ascending or descending order. The term sorting came into the picture, as humans realized the importance of searching quickly.
There are so many things in our real life that we need to search for, like a particular record in the database, roll numbers in the merit list, a particular telephone number in the telephone directory, a particular page in a book etc. All this would have been a mess if the data was kept unordered and unsorted, but fortunately, the concept of sorting came into existence, making it easier for everyone to arrange data in an order, hence making it easier to search.
Sorting arranges data in a sequence which makes searching easier.
Sorting Efficiency
If you ask me, how will I arrange a deck of shuffled cards in order, I would say, I will start by checking every card, and making the deck as I move on.
It can take me hours to arrange the deck in order, but that's how I will do it.
Well, thank god, computers don't work like this.
Since the beginning of the programming age, computer scientists have been working on solving the problem of sorting by coming up with various different algorithms to sort data.
The two main criterias to judge which algorithm is better than the other have been:
- Time taken to sort the given data.
- Memory Space required to do so.
Different Sorting Algorithms
There are many different techniques available for sorting, differentiated by their efficiency and space requirements. Following are some sorting techniques which we will be covering in next few tutorials.
- Bubble Sort
- Insertion Sort
- Selection Sort
- Quick Sort
- Merge Sort
- Heap Sort
0 comments:
Post a Comment