Vidyalelo
Data Structure · all questions

Sorting Algorithms
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

509

Questions

10/26

Page

Pick an option on a question to see the right answer and solution.

What is the typical running time of a heap sort algorithm?

Select an option to see the answer and solution.

What is the worst case complexity of QuickSort?

Select an option to see the answer and solution.

Which of the following sorting algorithm is in-place?

Select an option to see the answer and solution.

What is its wort case time complexity of Heap sort?

Select an option to see the answer and solution.

What is the worst case time complexity of strand sort?

Select an option to see the answer and solution.

Which of the following is the most suitable definition of radix sort?

Select an option to see the answer and solution.

What is the auxiliary space complexity of a median of three quick sort?

Select an option to see the answer and solution.

Sleep sort can be preferred over which of the following sorting algorithms for large number of input elements?

Select an option to see the answer and solution.

What is the auxiliary space requirement of introsort?

Select an option to see the answer and solution.

Which of the following is false?

Select an option to see the answer and solution.

Library sort is a modified version of which of the following sorting algorithm?

Select an option to see the answer and solution.

What is the worst case time complexity of bogosort?

Select an option to see the answer and solution.

Cube sort is an in place sorting algorithm.

Select an option to see the answer and solution.

What is the worst case time complexity of LSD radix sort?

Select an option to see the answer and solution.

Why is heap sort preferred over merge sort for introsort implementation?

Select an option to see the answer and solution.

Which of the following combines qualities of MSD radix sort and LSD radix sort?

Select an option to see the answer and solution.

Randomized quick sort is an in place sort.

Select an option to see the answer and solution.

In-place merge sort is a stable sort.

Select an option to see the answer and solution.

Tree sort is an online sorting algorithm.

Select an option to see the answer and solution.

Consider the following code snippet, which implements the Shell sort algorithm.
shellSort( int elements[], int num_elements , int incrmnts[], int num_incrmnts)
{
	int incr, j, k, span, y;
	for(incr = 0; incr ;< num_incrmnts; incr++)
	{
		span = incrmnts[incr]; data-structure-questions-answers-shell-sort
		for( j = span; j < num_elements; j++)
		{
			k = j;
			y = elements[j];
			while (________ )
			{
				elements [ k]  = elements[k - span];
				k = k - span;
			}
			elements[k] = y;
		}
	}
Which condition will correctly implement the while loop?

Select an option to see the answer and solution.