Skip to content
Discussion options

You must be logged in to vote

We need to determine if a given 9x9 Sudoku board is valid according to the standard Sudoku rules. The rules require that each row, each column, and each of the nine 3x3 sub-boxes contains unique digits from 1 to 9, ignoring any empty cells (represented by '.').

Approach

The approach involves checking three main conditions:

  1. Rows Check: Each row must have unique digits (1-9) without repetition.
  2. Columns Check: Each column must have unique digits (1-9) without repetition.
  3. Sub-boxes Check: Each of the nine 3x3 sub-boxes must have unique digits (1-9) without repetition.

To efficiently check these conditions, we use arrays to keep track of digits encountered in each row, column, and sub-box. F…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@basharul-siddike
Comment options

@mah-shamim
Comment options

mah-shamim Aug 30, 2025
Maintainer Author

Answer selected by basharul-siddike
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested medium Difficulty
2 participants