@@ -0,0 +1,1320 @@
+/***%0A * Write a program to solve a Sudoku puzzle by filling the empty cells.%0A *%0A * Empty cells are indicated by the character '.'.%0A *%0A * You may assume that there will be only one unique solution.%0A */%0Apublic class Solution %7B%0A    public boolean solveSudoku(char%5B%5D%5B%5D board) %7B%0A        for (int i = 0; i %3C 9; ++i)%0A            for (int j = 0; j %3C 9; ++j) %7B%0A                if(board%5Bi%5D%5Bj%5D != '.') %0A                    continue;%0A                for (int k = 0; k %3C 9; ++k) %7B%0A                    board%5Bi%5D%5Bj%5D = '1' + k;%0A                    if (isValid(board, i, j) && solveSudoku(board))%0A                        return true;%0A                    board%5Bi%5D%5Bj%5D = '.';%0A                %7D%0A                return false;%0A            %7D%0A        return true;%0A    %7D%0A    private boolean isValid(char%5B%5D%5B%5D board, int x, int y) %7B%0A        int i, j;%0A        for (i = 0; i %3C 9; i++) %0A            if (i != x && board%5Bi%5D%5By%5D == board%5Bx%5D%5By%5D)%0A                return false;%0A        for (j = 0; j %3C 9; j++)%0A            if (j != y && board%5Bx%5D%5Bj%5D == board%5Bx%5D%5By%5D)%0A                return false;%0A        for (i = 3 * (x / 3); i %3C 3 * (x / 3 + 1); i++)%0A            for (j = 3 * (y / 3); j %3C 3 * (y / 3 + 1); j++) %7B%0A                if ((i != x %7C%7C j != y) && board%5Bi%5D%5Bj%5D == board%5Bx%5D%5By%5D)%0A                    return false;%0A            %7D%0A        return true;%0A    %7D%0A%7D%0A

add SudokuSolver.java