public void solveSudoku(char[][] board) {

		if (board == null)
			return;
		int n = board.length;
		if (n != 9)
			return;
		int m = board[0].length;
		if (m != 9)
			return;

		initSets();
		ArrayList<BlankSpot> candidates = new ArrayList<BlankSpot>();

		for (int i = 0; i < 9; i++) {
			for (int j = 0; j < 9; j++) {
				int val = board[i][j] - '0';
				if (val >= 1 && val <= 9) {
					insertVertical(val, i, j);
					insertHorizontal(val, i, j);
					insertSquare(val, i, j);
				} else {
					candidates.add(new BlankSpot(i, j));
				}
			}
		}

		int size = candidates.size();
		if (size == 0)
			return;
		else {
			buildSudoku(board, candidates, 0, size);
		}
	}