A utility function to print solution
static void printSolution ( int board [ ] [ ] ) { int N = board . length ; for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < N ; j ++ ) System . out . printf ( " % 2d ▁ " , board [ i ] [ j ] ) ; System . out . printf ( "NEW_LINE"); } }