I have this code and it pretty much does what i want but i haveone small problem when i run it and do say like Queens 4 it givesme 4 Queens has 2 solutions but when id do Queens -v 4 it gives methe full answers of
(2,4,1,3)
(3,1,4,2)
which are right but the last thing it says is -v queens has 2solutions I need to change the -v in the sentence to the numberthat is given but i can’t find what in the code is messing thatup
class Queens {
static void placeQueen(int[][] B, int i, int j){
int count = 0;
int n = B.length;
if(
OR
OR