Utility function to print the contents of a 2 - D array
static void printMatrix ( int sol [ ] [ ] , int N ) { for ( int i = 0 ; i < N ; i ++ ) { for ( int j = 0 ; j < N ; j ++ ) System . out . print ( sol [ i ] [ j ] + " ▁ " ) ; System . out . println ( ) ; } }