Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion N_Queen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ void printsol(int board[n][n])
bool isvalid(int board[n][n], int row, int col) //We just need to check for the upper rows which have been filled before this
{
//To check vertically in a particular column

for (int i = 0; i < row; i++)
if (board[i][col])
return false;
Expand Down Expand Up @@ -48,4 +49,4 @@ int main()
else
cout << "No Solution Exists";
return 0;
}
}