private boolean helper(char[][] board, int row, int col) {

		if (row >= 9) {
			return true;
		} else if (col >= 9) {
			return helper(board, row + 1, 0);
		} else if (board[row][col] != '.') {
			return helper(board, row, col + 1);
		} else {
			Set<Character> set = new HashSet<Character>();
			int gridRow = row / 3;
			int gridCol = col / 3;
			for (int i = 0; i < 3; i++) {
				for (int j = 0; j < 3; j++) {
					set.add(board[3 * gridRow + i][3 * gridCol + j]);
				}
			}
			for (int i = 0; i < LEN; i++) {
				set.add(board[row][i]);
				set.add(board[i][col]);
			}
			for (char i = '1'; i <= '9'; i++) {
				if (!set.contains(i)) {
					board[row][col] = i;
					// if (isValidSudoku(board)) {
					if (helper(board, row, col + 1)) {
						return true;
					}
					// }
				}
			}
			board[row][col] = '.';
			return false;
		}
	}