Valid Sudoku
Solve this the way you would in the interview: out loud, on a timer, with an AI interviewer asking follow-ups while you code. You get a scored report at the end.
Practice this as a mock interviewFree to start, no account neededProblem
You are handed a partially filled 9 x 9 Sudoku grid board. Each cell holds a digit character '1'-'9' or '.' for an empty cell.
Return true if the filled cells break none of the Sudoku rules, meaning no digit repeats within any row, any column, or any of the nine 3 x 3 sub-boxes. Return false otherwise.
Only the digits already placed matter: a board can be valid even if it has no solution, and empty cells are ignored.
Examples
Constraints
- board.length == 9
- board[i].length == 9
- board[i][j] is a digit '1'-'9' or '.'
What the interviewer grades
A correct solution is one of five scores. The report also grades problem understanding (did you clarify inputs and edge cases before coding), problem solving, communication while you work, code quality, and testing. See a sample report, or read up on the pattern in the lessons.