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

8/26

Page

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

Which of the following don't affect the time complexity of bucket sort?

Select an option to see the answer and solution.

Tim sort begins sorting the given array by using which of the following sorting algorithm?

Select an option to see the answer and solution.

What is the average case time complexity of recursive bubble sort?

Select an option to see the answer and solution.

What is the auxiliary space complexity of standard merge sort?

Select an option to see the answer and solution.

What is the median of three techniques in quick sort?

Select an option to see the answer and solution.

Which of the following is not true about radix sort?

Select an option to see the answer and solution.

The Pancake Problems (1975, 1979, 1973) did NOT involve which of the following people?

Select an option to see the answer and solution.

Consider the code given below, which runs insertion sort:
void insertionSort(int arr[], int array_size)
{
  int i, j, value;
  for (i = 1; i < array_size; i++)
  {
          value = arr[i];
          j = i;
          while (________ )
          {
                   arr[j] = arr[j − 1];
                   j = j − 1;
          }
          arr[j] = value;
  }
}
Which condition will correctly implement the while loop?

Select an option to see the answer and solution.

Insertion sort is an online sorting algorithm.

Select an option to see the answer and solution.

LSD radix sort is faster than comparison sorts.

Select an option to see the answer and solution.

The essential part of Heap sort is construction of max-heap. Consider the tree shown below, the node 24 violates the max-heap property. Once heapify procedure is applied to it, which position will it be in?
Sorting Algorithms mcq question image

Select an option to see the answer and solution.

Brick sort uses which of the following methods for sorting the input?

Select an option to see the answer and solution.

What is the average time complexity of bead sort (S = sum of input elements)?

Select an option to see the answer and solution.

Which of the following is an advantage of binary insertion sort over its standard version?

Select an option to see the answer and solution.

Sleep sort does gives a correct output when . . . . . . . .

Select an option to see the answer and solution.

Which of the following sorting algorithm is not stable . . . . . . . .

Select an option to see the answer and solution.

Which of the following sorting algorithm is not in-place?

Select an option to see the answer and solution.

Binary insertion sort is a comparison based sort.

Select an option to see the answer and solution.

What is the running time of an insertion sort algorithm if the input is pre-sorted?

Select an option to see the answer and solution.

What is the space complexity of stooge sort?

Select an option to see the answer and solution.