1,959 views

2 Answers

4 votes
4 votes
then the complexity will be O(a+b) because merge procedure isnt in place . And the comparisons required is min of a,b .
edited by
0 votes
0 votes
if one array smallest element is greater than largest element of other one comparisons will be min(a,b)...this would be best case for merge procedure..one array would become empty so we can copy elements of another array..

Related questions

8 votes
8 votes
2 answers
1
0 votes
0 votes
1 answer
3
dhruba asked Jun 5, 2023
411 views
Consider performing QuickSort on an array of n distinct elements. What is the probability that no comparisons will be made between the smallest and largest element?a. 1/n...
2 votes
2 votes
2 answers
4