/* */ Click to Join Live Class with Shankar sir Call 9798158723

# Data Structure MCQ - Shell Sort

Q1.What is the other name for a shell sort algorithm?
1. Diminishing increment sort
2. Diminishing decrement sort
3. Insertion sort
4. Selection sort

Explanations : Clarification: The other name for a shell sort algorithm is diminishing decrement sort as the distance between comparisons decreases as the algorithm runs until the last phase.
Q2. The worst case running time of shell sort, using Shell’s increments is?
1. O(N)
2. O(N log N)
3. O(log N)
4. O(N2)

Explanations :The lower bound of a shell sort algorithm is mathematically found to be O(N2)
Q3.What is the best case complexity for shell sort?
1. O(1)
2. O(n)
3. O(logn)
4. O(n logn)

Q4.Who invented the shell sort algorithm?
1. John Von Neumann
2. Donald Shell
3. Tony Hoare
4. Alan Shell

Explanations : Clarification: Shell sort algorithm is invented by Donald shell. Merge sort is invented by John Von Neumann. Quick sort is invented by Tony Hoare.
Q5.Which of the following sorting algorithms is closely related to shell sort?
1. Selection sort
2. Merge sort
3. Insertion sort
4. Bucket sort

Explanations :Shell sort performs an insertion sort on hk independent arrays. It is mainly a variation of insertion sort.
Q6.Which of the following statements is the basic for loop for a shell sort algorithm?
1. for(increment=N/2;increment>0;increment/=2)
2. for(i=1;i< n;i++)
3. for(i=n/2;i>=0;i- -)
4. for(i=0;i< n;i++;numelements- -)

Explanations : for(increment=N/2;increment>0;increment/=2) represents shell sort, for(i=1;i< n;i++) represents insertion sort, for(i=n/2;i>=0;I- -) represents heap sort, for(i=0;i< n;i++;numelements- -) merge sort.
Q7.Shell sort algorithm is an example of?
1. External sorting
2. Internal sorting
3. In-place sorting
4. Bottom-up sorting