edited by
8,486 views
1 votes
1 votes

Minimum number of comparisons for merging 4 sorted files containing 50, 10, 25 and 15 records will be : 

  1. 100
  2. 200
  3. 175
  4. 125
edited by

1 Answer

Best answer
5 votes
5 votes
10 , 15, 25, 50

=(10+15-1) = 24

= (25 + 25 -1) = 49

= (50+50-1) = 99

Total = 172
selected by

Related questions

0 votes
0 votes
2 answers
1
radha gogia asked Jul 31, 2015
11,500 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 ...
2 votes
2 votes
1 answer
2
yes asked Oct 6, 2015
1,329 views
for example array contain a[1 2 3 3 3 3 3 4 5] then retun(1)
2 votes
2 votes
4 answers
3
GateAspirant999 asked Feb 2, 2017
3,519 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...