Question 1966 – Nielit STA 17-12-2017
December 10, 2023
Question 1975 – Nielit STA 17-12-2017
December 10, 2023
Question 1966 – Nielit STA 17-12-2017
December 10, 2023
Question 1975 – Nielit STA 17-12-2017
December 10, 2023

Question 1971 – Nielit STA 17-12-2017

Given two sorted list of size ‘m’ and ‘n’ respectively. he number of comparisons

needed in the worst case by the merge sort algorithm will be:

Correct Answer: D

Question 49 Explanation: 
→ To merge two lists of size m and n, we need to do m+n-1 comparisons in worst case.
→ Since we need to merge 2 at a time, the optimal strategy would be to take smallest size lists first.
→ The reason for picking smallest two items is to carry minimum items for repetition in merging.
A
m*n
B
minimum of m,n
C
Maximum of m,n
D
M+n-1
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!