retagged by
6,613 views

1 Answer

1 votes
1 votes
In the first pass we can create [105/5]=21 sorted sub-files,each 5 pages long.
In the second pass by 4-way merging (4 because one of the 5 available buffers has to be reserved for holding the output),

 We can create [21/4]=6 sorted sub-files,each 20 pages long (except the last).

Again applying 4-way merge sort,we get create [6/4]=2 sorted sub-files. These two can be merged to get the final sorted file. We need a total of 4 passes. Total cost will be 2 x 105 x 4=840 units.

Hence obtion C.
Answer:

Related questions

0 votes
0 votes
1 answer
1
pyuri asked Oct 6, 2015
1,243 views
What is K -way merge sort.... !!!!! i m very confused....if we say 2-way merge sort..does it mean dividing array into 2 parts or dividing array in size of 2!!!!
0 votes
0 votes
1 answer
2
Santhosh Devulapally asked Jan 3, 2016
6,673 views
IF ONE USES STRAIGHT MERGE SORT TO THE FOLLOWING ELEMENTS 20,47,15,8,9,4,40,30,12,17 THEN THE ORDER OF THE ELEMENTS AFTER 2ND PASS OF THE ALGORITHM
2 votes
2 votes
2 answers
3
VS asked Jan 30, 2018
4,219 views
Let A,B,C,D,E are sorted sequences having length 70,74,80,85,102 respectively.They are merged into a single sequence by merging together two sequences at a time.The minim...
1 votes
1 votes
1 answer
4
rahul sharma 5 asked Dec 10, 2016
1,127 views
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.?...