Question 10 – ISRO2018
February 13, 2024Question 14 – ISRO2018
February 13, 2024ISRO2018
Question 10

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*n


maximum of m and n


minimum of m and n


m+n–1

Question 10 Explanation:
Here the maximum number of comparisons is m+n1.
For example: Take 2 subarrays of size 3 such as 1,3,5 and another subarray 2,4,6. Then in this case number of comparisons is 5 which is m+n1 can be taken as O(m+n).
For example: Take 2 subarrays of size 3 such as 1,3,5 and another subarray 2,4,6. Then in this case number of comparisons is 5 which is m+n1 can be taken as O(m+n).
Correct Answer: D
Question 10 Explanation:
Here the maximum number of comparisons is m+n1.
For example: Take 2 subarrays of size 3 such as 1,3,5 and another subarray 2,4,6. Then in this case number of comparisons is 5 which is m+n1 can be taken as O(m+n).
For example: Take 2 subarrays of size 3 such as 1,3,5 and another subarray 2,4,6. Then in this case number of comparisons is 5 which is m+n1 can be taken as O(m+n).
Subscribe
Login
0 Comments