N-queen recursion problem

not showing the output

//left diagonal check
	int x = row;
	int y = col;
	while(x>=0 && y>=0){
		if(grid[x][y] == 1){
			return false;
		}
        x--;
        y--;       // you didn't write x-- and y--.
	}
	//right diagonal check
	 x = row;
	 y = col;
	while(x>=0 && y<n){
		if(grid[x][y] == 1){
			return false;
		}
        x--;
        y++;       // you didn't write x-- and y++.
	}

Hey @Vishal123
How can I help you ?

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.