diff --git a/lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java b/lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java index 577ecb81d..81904a893 100644 --- a/lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java +++ b/lectures/14-recursion/code/src/com/kunal/backtracking/SudokuSolver.java @@ -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; } }