You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description : In isSafe method below loop is intended to check if the number we are trying to insert is already available in the row or not. But below loop is iterating over columns and not on rows so it is checking if the number already exists in column or not instead of row.
// check the rowfor (inti = 0; i < board.length; i++) {
// check if the number is in the rowif (board[row][i] == num) {
returnfalse;
}
}
description : In isSafe method below loop is intended to check if the number we are trying to insert is already available in the row or not. But below loop is iterating over columns and not on rows so it is checking if the number already exists in column or not instead of row.
Link for code snippet : https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/blob/6bc4d8bf8ac5e434ac9083e1c01210e42f2a762c/lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java#L81C9-L86C10
The text was updated successfully, but these errors were encountered: