• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

Top MCQs on Sorting Algorithms with Answers

Question 11

The tightest lower bound on the number of comparisons, in the worst case, for comparison-based sorting is of the order of
  • N
  • N^2
  • NlogN
  • N(logN)^2

Question 12

In a modified merge sort, the input array is splitted at a position one-third of the length(N) of the array. Which of the following is the tightest upper bound on time complexity of this modified Merge Sort.

  • N(logN base 3)

  • N(logN base 2/3)

  • N(logN base 1/3)

  • N(logN base 3/2)

Question 13

Which sorting algorithm will take least time when all elements of input array are identical? Consider typical implementations of sorting algorithms.

  • Insertion Sort

  • Heap Sort

  • Merge Sort

  • Selection Sort

Question 14

In quick sort, for sorting n elements, the (n/4)th smallest element is selected as a pivot using an O(n) time algorithm. What is the worst-case time complexity of the quick sort?

(A) [Tex]\\theta [/Tex](n)

(B) [Tex]\\theta [/Tex](n*log(n))

(C) [Tex]\\theta [/Tex](n2)

(D) [Tex]\\theta [/Tex](n2 log n)

  • A

  • B

  • C

  • D

Question 15

Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element that splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then

  • T(n) <= 2T(n/5) + n

  • T(n) <= T(n/5) + T(4n/5) + n

  • T(n) <= 2T(4n/5) + n

  • T(n) <= 2T(n/2) + n

Question 16

Which of the following sorting algorithms has the lowest worst-case complexity?

  • Merge Sort

  • Bubble Sort

  • Quick Sort

  • Selection Sort

Question 17

Which sorting algorithms is most efficient to sort string consisting of ASCII characters?
  • Quick sort
  • Heap sort
  • Merge sort
  • Counting sort

Question 18

The number of elements that can be sorted in [Tex]\\Theta(logn)[/Tex] time using heap sort is
(A) [Tex]\\Theta(1)[/Tex]
(B) [Tex]\\Theta(\\sqrt{logn})[/Tex]
(C) [Tex]\\Theta(Log n/(Log Log n))[/Tex]
(d) [Tex]\\Theta(Log n)[/Tex] 
  • A
  • B
  • C
  • D

Question 19

Which of the following is true about merge sort?

  • Merge Sort works better than quick sort if data is accessed from slow sequential memory.

  • Merge Sort is stable sort by nature

  • Merge sort outperforms heap sort in most of the practical situations.

  • All of the above.

Question 20

Given an array where numbers are in range from 1 to n6, which sorting algorithm can be used to sort these number in linear time?
  • Not possible to sort in linear time
  • Radix Sort
  • Counting Sort
  • Quick Sort

There are 61 questions to complete.

Last Updated :
Take a part in the ongoing discussion