Skip to content

Commit 2785f97

Browse files
committed
Add comment
1 parent 96ae3cc commit 2785f97

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/com/thealgorithms/others/Sudoku.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public static boolean isSafe(int[][] board, int row, int col, int num) {
5757
/**
5858
* Solves the Sudoku puzzle using backtracking.
5959
* The algorithm finds an empty cell and tries placing numbers from 1 to 9.
60+
* The standard version of Sudoku uses numbers from 1 to 9, so the algorithm can be
61+
* easily modified for other variations of the game.
6062
* If a number placement is valid (checked via `isSafe`), the number is placed and the function
6163
* recursively attempts to solve the rest of the puzzle.
6264
* If no solution is possible, the number is removed (backtracked), and the process is repeated.

0 commit comments

Comments
 (0)