i am getting same arrangement
N knights problem
@Harshit13,
You have to print the co-ordinates of the cells where you would keep a knight, not all co-ordinates.
Try this at Line 19:
     if(mat[i][j]==1) cout << "{" << i << "-" << j << "} "; 
      
    
i am getting same arrangement
@Harshit13,
You have to print the co-ordinates of the cells where you would keep a knight, not all co-ordinates.
Try this at Line 19:
     if(mat[i][j]==1) cout << "{" << i << "-" << j << "} ";