1. What i the advantage of quick sort?
Quick sort reduces unnecessary swaps and moves an item to a greater distance, in one move.
2. What is the average efficiency of heap sort?
The average efficiency of heap sort is 0 (n(log2 n)) where, n is the number of elements sorted.
3. Define segment?
When large blocks of data are to be sorted, only a portion of the block or file is loaded in the main memory of the computer since, it cannot hold the entire block. This small portion of file is called a segment.
4. Name some of the external sorting methods?
a. Polyphase merging
b. Oscillation sorting
c. Merge sorting
5. When is a sorting method said to be stable?
A sorting method is said to be stable, it two data items of matching values are guaranteed to be not rearranged with respect to each other as the algorithm progresses.
6. Name some simple algorithms used in external sorting?
a. Multiway merge
b. Polyphase merge
c. Replacement selection
7. When can we use insertion sort?
Insertion sort is useful only for small files or very nearly sorted files.
8. How many passes are required fork-way merging?
The number of passes required using k-way merging is [log k (n/m)] because the N H S get k times as large in each pass.
9. Define max heap?
A heap in which the parent has a larger key than the child's is called a max heap.
10. Define min heap?
A heap in which the parent has a smaller key than the child's is called a min heap.
Quick sort reduces unnecessary swaps and moves an item to a greater distance, in one move.
2. What is the average efficiency of heap sort?
The average efficiency of heap sort is 0 (n(log2 n)) where, n is the number of elements sorted.
3. Define segment?
When large blocks of data are to be sorted, only a portion of the block or file is loaded in the main memory of the computer since, it cannot hold the entire block. This small portion of file is called a segment.
4. Name some of the external sorting methods?
a. Polyphase merging
b. Oscillation sorting
c. Merge sorting
5. When is a sorting method said to be stable?
A sorting method is said to be stable, it two data items of matching values are guaranteed to be not rearranged with respect to each other as the algorithm progresses.
6. Name some simple algorithms used in external sorting?
a. Multiway merge
b. Polyphase merge
c. Replacement selection
7. When can we use insertion sort?
Insertion sort is useful only for small files or very nearly sorted files.
8. How many passes are required fork-way merging?
The number of passes required using k-way merging is [log k (n/m)] because the N H S get k times as large in each pass.
9. Define max heap?
A heap in which the parent has a larger key than the child's is called a max heap.
10. Define min heap?
A heap in which the parent has a smaller key than the child's is called a min heap.
No comments:
Post a Comment