Skip to content

Commit 2a2a900

Browse files
authored
fix: Apply clang-format to SudokuSolver.java
- Format array on single line - Remove trailing whitespace - Add newline at end of file
1 parent c13c37c commit 2a2a900

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/main/java/com/thealgorithms/backtracking/SudokuSolver.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Sudoku Solver using Backtracking algorithm
55
* Solves a 9x9 Sudoku puzzle using depth-first search with backtracking
6-
*
6+
*
77
* @author Your Name
88
*/
99
public final class SudokuSolver {
@@ -114,17 +114,7 @@ private static void printBoard(int[][] board) {
114114
* @param args command line arguments (not used)
115115
*/
116116
public static void main(String[] args) {
117-
int[][] board = {
118-
{5, 3, 0, 0, 7, 0, 0, 0, 0},
119-
{6, 0, 0, 1, 9, 5, 0, 0, 0},
120-
{0, 9, 8, 0, 0, 0, 0, 6, 0},
121-
{8, 0, 0, 0, 6, 0, 0, 0, 3},
122-
{4, 0, 0, 8, 0, 3, 0, 0, 1},
123-
{7, 0, 0, 0, 2, 0, 0, 0, 6},
124-
{0, 6, 0, 0, 0, 0, 2, 8, 0},
125-
{0, 0, 0, 4, 1, 9, 0, 0, 5},
126-
{0, 0, 0, 0, 8, 0, 0, 7, 9}
127-
};
117+
int[][] board = {{5, 3, 0, 0, 7, 0, 0, 0, 0}, {6, 0, 0, 1, 9, 5, 0, 0, 0}, {0, 9, 8, 0, 0, 0, 0, 6, 0}, {8, 0, 0, 0, 6, 0, 0, 0, 3}, {4, 0, 0, 8, 0, 3, 0, 0, 1}, {7, 0, 0, 0, 2, 0, 0, 0, 6}, {0, 6, 0, 0, 0, 0, 2, 8, 0}, {0, 0, 0, 4, 1, 9, 0, 0, 5}, {0, 0, 0, 0, 8, 0, 0, 7, 9}};
128118

129119
System.out.println("Sudoku Puzzle:");
130120
printBoard(board);
@@ -135,5 +125,6 @@ public static void main(String[] args) {
135125
} else {
136126
System.out.println("\nNo solution exists for this Sudoku puzzle.");
137127
}
128+
138129
}
139-
}
130+
}

0 commit comments

Comments
 (0)