Recent questions tagged merge-sort

1 votes
1 answer
61
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 \times n$maximum of $m$ and...
1 votes
1 answer
62
Consider the modified merge sort where we divide array into 5 equal sub arrays instead if 2(as in standard merge sort).What is the time complexity if modified merge sort?...
2 votes
2 answers
63
1 votes
0 answers
64
3 votes
1 answer
67
Merge sort using linked list is better than array in terms of space complexitytrue or not with explanation :)
4 votes
1 answer
69
True or FalseMerge sort on Linked list takes O(nlogn)
4 votes
4 answers
70
Consider bottom-up merge sort working on 'n' elements. Assume 'n' is a power of 2. The minimum number of comparisons in order to get sorted list is(A) (n log n) / 2(B) n ...
0 votes
1 answer
71
The best case time complexity to merge two sorted file of size m and n isA. O(m) B. O(n) C. O(MIN{m,n}) D. O(m+n)
1 votes
1 answer
72
Which of the following algorithm gives best performance when items are in reverse order ?a) Merge sort.b) Heap sort.
2 votes
2 answers
73
1 votes
1 answer
74
Consider bottom- up merge sort working on 'n' elements . Assume n is a power of 2. The minimum number of comparisons in order to get sorted list isa) n log n/2b)n log n-n...
1 votes
1 answer
75
Assume 5 buffer pages are available to sort a file of 105 pages. The cost of sorting using m-way merge sort is
6 votes
3 answers
76
Q . In the standard merge sort algorithm on a list of size n, what is the maximum number of times an item can be compared?a)2b)lognc)n-1d)NOTMy doubt is here ,Are we cons...
1 votes
2 answers
77
1 votes
3 answers
78
You are asked to sort 15 randomly generated numbers. One should prefer—(a) Bubble sort (b) Quick sort (c) Merge sort (d) Heap sortI think the answer should be c or d cr...
0 votes
1 answer
79
CAn anyone explian about 2-way merge sort ?(You can take example from GATE1999-1.14, ISRO2015-42)
1 votes
3 answers
81
0 votes
2 answers
82
0 votes
4 answers
83
0 votes
1 answer
84
4 votes
1 answer
87
What are the number of comparisons in merge sort?m+n or m+n-1...
1 votes
1 answer
88
Is 2 way merge behaves same as we do in merge sort?Dividing into groups of two from top to bottom or does it start from bottom to top by mergeing two elements at a time.?...
0 votes
0 answers
89
Assume that a merge sort algorithm in worst case takes30s for an input of size 64. Which of the following closely approximate maximum input size of a problem that can be ...
2 votes
1 answer
90
Assume 5 buffer pages are available to sort a file of 105 pages. The cost of sorting using m-way merge sort isA. 206B. 618C. 840D. 926