Bottom-Up Mergesort Multiple choice Questions and Answers (MCQs)

DOWNLOAD FREE PDF <<CLICK HERE>>

Bottom-Up Mergesort Multiple choice Questions and Answers (MCQs)

Congratulations - you have completed Bottom-Up Mergesort Multiple choice Questions and Answers (MCQs).

You scored %%SCORE%% out of %%TOTAL%%.

Your performance has been rated as %%RATING%%


Your answers are highlighted below.
Question 1 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
Merge sort uses which of the following algorithm to implement sorting?
A
backtracking
B
greedy algorithm
C
divide and conquer
D
dynamic programming
Question 1 Explanation: 
Merge sort uses the technique of divide and conquer in order to sort a given array. It divides the array into two halves and applies merge sort algorithm to each half individually after which the sorted versions of these halves are merged together.

Question 2 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the average case time complexity of standard merge sort?
A
O(n log n)
B
O(n2)
C
O(n2 log n)
D
O(n log n2)
Question 2 Explanation: 
The recurrence relation for merge sort is given by T(n) = 2T(n/2) + n. This can be solved using master's theorem and is found equal to O(n log n).

Question 3 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the auxiliary space complexity of standard merge sort?
A
O(1)
B
O(log n)
C
O(n)
D
O(n log n)
Question 3 Explanation: 
The merging of two sorted arrays requires an additional space of n due to which the auxiliary space requirement of merge sort is O(n). Thus merge sort is not an in place sorting algorithm.

Question 4 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the auxiliary space complexity of bottom up merge sort?
A
O(1)
B
O(n)
C
O(log n)
D
O(n log n)
Question 4 Explanation: 
The auxiliary space complexity of bottom up merge sort is same as standard merge sort as both uses the same algorithm for merging the sorted arrays which takes o(n) space. But bottom up merge sort does not need to maintain a call stack.

Question 5 [CLICK ON ANY CHOICE TO KNOW MCQ multiple objective type questions RIGHT ANSWER]
What is the average time complexity of bottom up merge sort?
A
O(n log n)
B
O(n2)
C
O(n2 log n)
D
O(n log n2)
Question 5 Explanation: 
The merge function in the bottom up merge sort takes O(n) time which is placed inside the for loop. The loop runs for O(log n) time, thus the overall time complexity of the code becomes O(n log n).

Once you are finished, click the button below. Any items you have not completed will be marked incorrect. Get Results
There are 5 questions to complete.

DOWNLOAD FREE PDF <<CLICK HERE>>