Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 1999 | Question 45

  • Last Updated : 07 Sep, 2018

The minimum number of record movements required to merge five files A (with 10 records), B (with 20 records), C (with 15 records), D (with 5 records) and E (with 25 records) is:
(A) 165
(B) 90
(C) 75
(D) 65


Answer: (A)

Explanation: Using optimal merge pattern algorithm arrange files in increasing order of records:

D  A   C   B   E

5  10  15  20  25 

Now, minimum number of record movements required = sum of internal node’s value = 15 + 30 + 45 + 75 = 165

So, option (A) is correct.


Quiz of this Question

Attention reader! Don’t stop learning now.  Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.

Learn all GATE CS concepts with Free Live Classes on our youtube channel.

My Personal Notes arrow_drop_up
Recommended Articles
Page :