Recent questions tagged merging

0 0 votes
1 answers 1 answer
359
359 views
Consider six files F1, F2, F3, F4, F5, and F6 with 90, 15, 25, 12, 70 and 110 records respectively.What is the minimum number of record movements required to merge these ...
0 0 votes
1 1 answer
2.2k
2.2k views
DSA
Given two max heap, one of size n and other m. Calculate the time complexity of merging them to get a max heap.
5 5 votes
1 1 answer
854
854 views
Consider the following pseudo-code of function fun(). fun() takes k arrays as input and return merged array of all. Assume that merge function takes $O(p+q)$ where $p$ is...
0 0 votes
0 0 answers
1.9k
1.9k views
Can anyone help me to understand this problem….??
0 0 votes
1 1 answer
1.1k
1.1k views
What is the minimum and maximum number of comparisons required to merge two lists of size m and n ?
3 3 votes
1 1 answer
2.2k
2.2k views
How many swaps are performed in Merge sort algorithm in worst case?
0 0 votes
2 2 answers
2.4k
2.4k views
The total number of comparions required to merge 4 sorted files containing 15, 3, 9 and 8 records into a single sorted file is A.66 B.39 C.15 D.33
0 0 votes
3 3 answers
2.3k
2.3k views
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is(A) (B) (C) (D)
3 3 votes
2 answers 2 answers
20.1k
20.1k views
The average no. of comparisons performed by the merge sort algorithm, in merging two sorted lists of length 2 is -a) 8/3b) 8/5c) 11/7d) 11/6
0 0 votes
2 2 answers
1.2k
1.2k views
2 2 votes
1 answers 1 answer
4.6k
4.6k views
Given a set of sorted files f1,f2,f3,f4,f5 of lengths 99,27,71,199,259 we need to merge these files into a single sorted file Using Optimal Merge Pattern.
2 2 votes
2 answers 2 answers
2.3k
2.3k views
To merge 2 files of size m and n it takes m + n time What will be the optimal time Complexity to merge the files of size 10, 15, 40, 70, 75 and 80?
2 2 votes
4 4 answers
5.2k
5.2k views
Suppose there are 4 sorted lists of 8 elements each. If we merge these lists into a single sorted list of 32 elements. The key comparisons that are needed in the worst ca...
0 0 votes
0 0 answers
470
470 views
0 0 votes
0 0 answers
1.4k
1.4k views
Can anyone clarify hy they are getting 269 and and I am getting 258?
2 2 votes
4 4 answers
6.0k
6.0k views
The optimal time required in merging the list of size 11, 21, 33, 34,45,54,60 ismy answer (11+21)*4+ 33*3 +(34+45)*3 + (54+60)*2but the provided answer is 269 to 282I don...
0 0 votes
1 1 answer
523
523 views
0 0 votes
1 answers 1 answer
757
757 views
Let $F_1,F_2,..............F_n$ be files with length $L_1,L_2........L_n$ we would like to merge all of the files together to make a single file .The cost of merging file...
0 0 votes
1 answers 1 answer
517
517 views
Number of comparisions in worst case required to merge two sorted arrays of size 40 and 60 are -
0 0 votes
2 answers 2 answers
13.4k
13.4k views
If I have two lists of length 2 then no of comparisons in the worst case would be 2 only , since If I have say 10,20 in list A and 5,7 in list B so then on merging 10 is ...
44 44 votes
6 answers 6 answers
56.9k
56.9k views
For merging two sorted lists of sizes $m$ and $n$ into a sorted list of size $m+n$, we require comparisons of$O(m)$$O(n)$$O(m+n)$$O(\log m + \log n)$
137 137 votes
10 answers 10 answers
42.8k
42.8k views
Suppose $P, Q, R, S, T$ are sorted sequences having lengths $20, 24, 30, 35, 50$ respectively. They are to be merged into a single sequence by merging together two sequen...
To see more, click for the full list of questions or popular tags.