Friday, 24 November 2017

Sorting Algorithms:

Meaning of Sorting in data structure:
1. Sorting is the process of arranging items in a certain sequence or in different sets .
2. The main purpose of sorting information is to optimize it's usefulness for a specific tasks.
3. Sorting is one of the most extensively researched subject because of the need to speed up the operations on thousands or millions of records during a search operation.

Different types of Sorting algorithms:

Internal Sorting :
1. An internal sort is any data sorting process that takes place entirely within the main memory of a computer. 
2. This is possible whenever the data to be sorted is small enough to all be held in the main memory. 
3. For sorting larger data-sets, it may be necessary to hold only a chunk of data in memory at a time, since it won’t all fit. 
4. The rest of the data is normally held on some larger, but slower medium, like a hard-disk. 
5. Any reading or writing of data to and from this slower media can slow the sorting process considerably.

External Sorting: 
1. Many important sorting applications involve processing very large files, much too large to fit into the primary memory of any computer.
2. Methods appropriate for such applications are called external methods, since they involve a large amount of processing external to the central processing unit. 
3. There are two major factors which make external algorithms quite different: 
First, the cost of accessing an item is orders of magnitude greater than any bookkeeping or calculating costs.
Second, over and above with this higher cost, there are severe restrictions on access, depending on the external storage medium used: for example, items on a magnetic tape can be accessed only in a sequential manner.

Mukesh Rajput

No comments:

Post a Comment

Mukesh Rajput