Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

ISRO | ISRO CS 2015 | Question 13

  • Last Updated : 03 Apr, 2018

Six files F1, F2, F3, F4, F5 and F6 have 100, 200, 50, 80, 120, 150 records respectively. In what order should they be stored so as to optimize act. Assume each file is accessed with the same frequency
(A) F3, F4, F1, F5, F6, F2
(B) F2, F6, F5, F1, F4, F3
(C) F1, F2, F3, F4, F5, F6
(D) Ordering is immaterial as all files are accessed with the same frequency.


Answer: (A)

Explanation:

This question is based on the Optimal Storage on Tape problem
which uses greedy approach to find the optimal time to retrieve them.
There are n programs of length L that are to be stored on a computer
tape. Associated with each program i is a length Li. So in order to
retrieve these programs most optimally, we need to store them in the
non-decreasing order of length Li.
So, the correct order is F3, F4, F1, F5, F6, F2


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :