|
5 | 5 | * @author Indraneela Doradla (<a href="https://github.com/captiosus1">git-Indraneela Doradla</a>)
|
6 | 6 | */
|
7 | 7 | public final class SudokuSolver {
|
8 |
| - private SudokuSolver(){ |
9 | 8 |
|
10 |
| - } |
11 |
| -// public static void main(String[] args) { |
12 |
| -// int[][] board = { |
13 |
| -// {0, 0, 7, 4, 0, 1, 0, 2, 9}, |
14 |
| -// {8, 0, 0, 0, 0, 0, 0, 0, 7}, |
15 |
| -// {0, 0, 0, 0, 0, 3, 0, 0, 0}, |
16 |
| -// {0, 5, 0, 0, 0, 0, 6, 0, 0}, |
17 |
| -// {0, 0, 8, 2, 0, 7, 0, 1, 0}, |
18 |
| -// {0, 0, 0, 0, 9, 0, 0, 0, 0}, |
19 |
| -// {0, 0, 4, 0, 3, 0, 0, 0, 0}, |
20 |
| -// {0, 0, 0, 0, 8, 0, 0, 9, 0}, |
21 |
| -// {6, 0, 0, 9, 0, 4, 1, 0, 0} |
22 |
| -// }; |
23 |
| -// |
24 |
| -// if (solveSudoku(board)) { |
25 |
| -// System.out.println("Sudoku solved:"); |
26 |
| -// printSudoku(board); |
27 |
| -// } else { |
28 |
| -// System.out.println("No solution exists for the Sudoku"); |
29 |
| -// } |
30 |
| -// } |
| 9 | + private SudokuSolver() { |
| 10 | + // Private constructor to prevent instantiation |
| 11 | + } |
31 | 12 |
|
32 | 13 | /**
|
33 | 14 | * Solves the Sudoku using backtracking
|
|
0 commit comments