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 

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  Correct Answer F3, F4, F1, F5, F6, F2 

The correct answer is option 1.

Key Points

An optimal merge pattern will give the optimal result after performing sorted order. Every time it will take the least frequency elements and performing merging.

[ alt="F1 Raju Madhuri 20.04.2021 D1" src="//storage.googleapis.com/tb-img/production/21/04/F1_Raju_Madhuri_20.04.2021_D1.png" style="width: 400px; height: 260px;">

∴ Hence the correct answer is F3, F4, F1, F5, F6, F2.

Related Questions