Skip to content

Commit 5a69898

Browse files
committed
Generalize comment
1 parent 2785f97 commit 5a69898

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,14 @@ public static boolean solveSudoku(int[][] board, int n) {
115115
* @param n The size of the Sudoku board (typically 9 for a standard puzzle).
116116
*/
117117
public static void print(int[][] board, int n) {
118-
// Print the board in a 9x9 grid format
118+
// Print the board in a nxn grid format
119119
for (int r = 0; r < n; r++) {
120120
for (int d = 0; d < n; d++) {
121121
System.out.print(board[r][d]);
122122
System.out.print(" ");
123123
}
124124
System.out.print("\n");
125125

126-
// Print a blank line after every 3 rows for readability
127126
if ((r + 1) % (int) Math.sqrt(n) == 0) {
128127
System.out.print("");
129128
}

0 commit comments

Comments
 (0)