A utility function to print solution matrix sol [ N ] [ N ]
static void printSolution ( int [ , ] sol ) { for ( int x = 0 ; x < N ; x ++ ) { for ( int y = 0 ; y < N ; y ++ ) Console . Write ( sol [ x , y ] + " ▁ " ) ; Console . WriteLine ( ) ; } }