Printing path
for ( int j = 1 ; j <= i ; j ++ ) System . out . print ( ( j ) + " ▁ " ) ; System . out . print ( ( N + 1 ) + " ▁ " ) ; for ( int j = i + 1 ; j <= N ; j ++ ) System . out . print ( ( j ) + " ▁ " ) ; return ; } }