mod m will help in traversing the blocks from starting block after we reach the end .
j = ( j + 1 ) % m ; } } Console . Write ( " STRNEWLINE Process ▁ No . TABSYMBOL Process ▁ Size TABSYMBOL Block ▁ no . STRNEWLINE " ) ; for ( int i = 0 ; i < n ; i ++ ) { Console . Write ( i + 1 + " TABSYMBOL TABSYMBOL " + processSize [ i ] + " TABSYMBOL TABSYMBOL " ) ; if ( allocation [ i ] != - 1 ) { Console . Write ( allocation [ i ] + 1 ) ; } else { Console . Write ( " Not ▁ Allocated " ) ; } Console . WriteLine ( " " ) ; } }