Skip to content

Commit

Permalink
Fix for issue kunal-kushwaha#1388 - correcting isSafe method in sudok…
Browse files Browse the repository at this point in the history
…u solver.
  • Loading branch information
Akhil-Selukar committed Oct 2, 2024
1 parent 6bc4d8b commit 7d4c316
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static boolean isSafe(int[][] board, int row, int col, int num) {
// check the row
for (int i = 0; i < board.length; i++) {
// check if the number is in the row
if (board[row][i] == num) {
if (board[i][col] == num) {
return false;
}
}
Expand Down

0 comments on commit 7d4c316

Please sign in to comment.