Skip to content
Related Articles
Open in App
Not now

Related Articles

ISRO | ISRO CS 2015 | Question 13

Improve Article
Save Article
  • Last Updated : 03 Apr, 2018
Improve Article
Save Article

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


F3, F4, F1, F5, F6, F2


F2, F6, F5, F1, F4, F3


F1, F2, F3, F4, F5, F6


Ordering is immaterial as all files are accessed with the same frequency.

Answer: (A)


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
Related Articles

Start Your Coding Journey Now!