CARVIEW |
Top MCQs on MergeSort Algorithm with Answers
Question 1
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
O (n*log(n))
O (n2 log n)
O (n2 + log(n))
O (n2)
Question 2
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 3
If one uses straight two-way merge sort algorithm to sort the following elements in ascending order: 20, 47, 15, 8, 9, 4, 40, 30, 12, 17 then the order of these elements after second pass of the algorithm is:
8, 9, 15, 20, 47, 4, 12, 17, 30, 40
8, 15, 20, 47, 4, 9, 30, 40, 12, 17
15, 20, 47, 4, 8, 9, 12, 30, 40, 17
4, 8, 9, 15, 20, 47, 12, 17, 30, 40
Question 4
Given two sorted list of size m and n respectively. The number of comparisons needed the worst case by the merge sort algorithm will be
m x n
maximum of m and n
minimum of m and n
m + n - 1
Question 5
Of the following sorting algorithms, which has a running time that is least dependent on the initial ordering of the input?
Merge Sort
Insertion Sort
Selection Sort
Quick Sort
Question 6
- Heap sort
- Merge sort
- Quick sort
- Insertion sort
Question 7
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 8
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 9
Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?
256
512
1024
2048
Question 10
- Merge sort.
- Bubble sort.
- Quick sort.
- Insertion sort.
There are 13 questions to complete.