Sorting
Sorting
What is Sorting?
Sorting refers to the operation or technique of arranging and rearranging sets of data in some specific order. A collection of records called a list where every record has one or more fields. The fields which contains a unique values for each record is termed as the key field.
- Sorting is the operation performed to arrange the records of a table or list in some order according to some specific ordering criterion. Sorting is performed according to some key value of each record.
- The records are either sorted either numerically or alphanumerically. The records are then arranged in ascending or descending order depending on the numerical value of the key.
Categories of Sorting
- Internal Sorting
- External Sorting
External Sorting : When the data that is to be sorted cannot be accommodated in the memory at the same time and some has to be kept in auxiliary memory such as hard disk , floppy disk, magnetic tapes etc , then the external sorting method are performed.
The complexity of Sorting Algorithms
- The length of time spent by the programmer in programming a specific sorting program.
- Amount of machine time necessary for running the program
- The amount of memory necessary for running the program.
The Efficiency of Sorting Technique
- Best case
- Worst case
- Average case
Types of sorting Technique
- Bubble sort
- Selection sort
- Merge sort
- Insertion sort
- Quick sort
- Heap sort
Comments
Post a Comment