@@ -0,0 +1,1427 @@
+/***%0A * Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.%0A *%0A * The Sudoku board could be partially filled, where empty cells are filled with the character '.'.%0A *%0A * Note:%0A * A valid Sudoku board (partially filled) is not necessarily solvable. Only the filled cells need to be validated.%0A */%0Apublic class Solution %7B%0A    public boolean isValidSudoku(char%5B%5D%5B%5D board) %7B%0A        boolean used%5B%5D = new boolean%5B9%5D;%0A%0A        for (int i = 0; i %3C 9; i++)%7B%0A%0A            // check line%0A            Arrays.fill(used, false);%0A            for (int j = 0; j %3C 9; j++)%0A                if (!check(board%5Bi%5D%5Bj%5D, used))%0A                    return false;%0A            // check column%0A            Arrays.fill(used, false);%0A            for (int j = 0; j %3C 9; j++)%0A                if (!check(board%5Bj%5D%5Bi%5D, used))%0A                    return false;%0A        %7D%0A        //check 3x3 matrix%0A        for (int l = 0; l %3C 3; l++)%0A            for (int c = 0; c %3C 3; c++) %7B%0A                Arrays.fill(used, false);%0A                for (int i = l * 3; i %3C (l + 1) * 3; i++)%0A                    for (int j = c * 3; j %3C (c + 1) * 3; j++)%0A                        if (!check(board%5Bi%5D%5Bj%5D, used))%0A                            return false;%0A            %7D%0A        return true;%0A    %7D%0A%0A    boolean check (char c, boolean used%5B%5D) %7B%0A        if (ch == '.') return true;%0A        if (used%5Bc - '1'%5D) return false;%0A        return used%5Bc - '1'%5D = true;%0A    %7D%0A%7D%0A

add ValidSudoku.java