public boolean isValidSudoku(char[][] board) {
		int n = board.length;
		if (n != 9)
			return false;
		int m = board[0].length;
		if (m != 9)
			return false;
		List<HashSet<Integer>> rowCheckers = new ArrayList<>(9);
		List<HashSet<Integer>> colCheckers = new ArrayList<>(9);
		List<HashSet<Integer>> squareCheckers = new ArrayList<>(9);
		for (int i = 0; i < n; i++) {
			rowCheckers.add(new HashSet<Integer>());
			colCheckers.add(new HashSet<Integer>());
			squareCheckers.add(new HashSet<Integer>());
		}
		for (int i = 0; i < n; i++) {
			for (int j = 0; j < m; j++) {
				int num = board[i][j] - '0';
				if (num > 0) { // Input number in sudoku can be any positive integer
					if (rowCheckers.get(i).contains(num)
							|| colCheckers.get(j).contains(num)
							|| squareCheckers.get(i / 3 * 3 + j / 3).contains(
									num))
						return false;
					else {
						rowCheckers.get(i).add(num);
						colCheckers.get(j).add(num);
						squareCheckers.get(i / 3 * 3 + j / 3).add(num);
					}
				}
			}
		}
		return true;
	}