public void solveSudoku(char[][] input) {
        boolean[][] horizontal = new boolean[9][9];
        boolean[][] vertical = new boolean[9][9];
        boolean[][] box = new boolean[9][9];
        for (int i = 0; i < input.length; i++) {
            for (int j = 0; j < input[0].length; j++) {
                if (input[i][j] == '.') {
                    continue;
                }
                horizontal[i][input[i][j] - '1'] = true;
                vertical[j][input[i][j] - '1'] = true;
                int index = 3*(i/3) + j/3;
                box[index][input[i][j] - '1'] = true;
            }
        }
        solveSudokuUtil(input, horizontal, vertical, box, 0, 0);
    }
Date 03/24/2016
@author Tushar Roy

Write a program to solve a Sudoku puzzle by filling the empty cells.

https://leetcode.com/problems/sudoku-solver/
src/com/interview/recursion/SudokuSolver.java