1.What is meant by sorting?
Ordering the data in an increasing or decreasing fashion according to some relationship among the data item is called sorting.
2. What are the two main classifications of sorting based on the source of data?
a. Internal sorting
b. External sorting
3. What is meant by external sorting?
External sorting is a process of sorting in which large blocks of data stored in storage devices are moved to the main memory and then sorted.
4. What is meant by internal sorting?
Internal sorting is a process of sorting the data in the main memory.
5. What are the various factors to be considered in deciding a sorting algorithm?
a. Programming time
b. Execution time of the program
c. Memory needed for program environment
6. What is the main idea behind insertion sort?
The main idea of insertion sort is to insert in the ith pass the ith element in A (1) A (2)...A (i) in its rightful place.
7. What is the main idea behind insertion sort?
The main idea behind the selection sort is to find the smallest element among in A (I) A (J+1)...A (n) and then interchange it with a (J). This process is then repeated for each value of J.
8. What is the basic of shell sort?
Instead of sorting the entire array at once, it is first divide the array into smaller segments, which are then separately sorted using the insertion sort.
9. What is the other name for shell sort?
Diminishing increment sort.
10. What is the purpose of quick sort?
The purpose of the quick sort is to move a data item in the correct direction, just enough for to reach its final place in the array.
No comments:
Post a Comment