Lengths of programs sorted according to increasing lengths . This is the order in which the programs have to be stored on tape for minimum MRT
System . out . print ( " Optimal ▁ order ▁ in ▁ which ▁ " + " programs ▁ are ▁ to ▁ be ▁ stored ▁ is : ▁ " ) ; for ( int i = 0 ; i < n ; i ++ ) System . out . print ( L [ i ] + " ▁ " ) ; System . out . println ( ) ;