FastPrepSudoku Board Validation
Problems/Sudoku Board Validation

Sudoku Board Validation

Confluent logoConfluent● MediumFULLTIMEPHONE SCREENONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Confluent onsite interview. The report names checking a Sudoku board. It leaves out whether the board may be partly filled, the matching rules, the interface, the examples, and the limits. Our version is about 75% the same as the reported question.

Given a partially filled 9 x 9 Sudoku board, return true if every filled cell obeys the Sudoku rules and false otherwise.

Each row, each column, and each of the nine 3 x 3 sub-boxes may contain each digit from 1 through 9 at most once. An empty cell contains '.'.

Check only whether the filled cells are consistent. The board does not need to be solvable.

Function

isValidSudoku(board: char[][]) → boolean

Examples

Example 1

board = [["5","3",".",".","7",".",".",".","."],["6",".",".","1","9","5",".",".","."],[".","9","8",".",".",".",".","6","."],["8",".",".",".","6",".",".",".","3"],["4",".",".","8",".","3",".",".","1"],["7",".",".",".","2",".",".",".","6"],[".","6",".",".",".",".","2","8","."],[".",".",".","4","1","9",".",".","5"],[".",".",".",".","8",".",".","7","9"]]return = true
board
012345678053..7....16..195...2.98....6.38...6...344..8.3..157...2...66.6....28.7...419..58....8..79

No row, column, or sub-box repeats a filled digit.

Example 2

board = [["5","3",".",".","7",".",".",".","5"],["6",".",".","1","9","5",".",".","."],[".","9","8",".",".",".",".","6","."],["8",".",".",".","6",".",".",".","3"],["4",".",".","8",".","3",".",".","1"],["7",".",".",".","2",".",".",".","6"],[".","6",".",".",".",".","2","8","."],[".",".",".","4","1","9",".",".","5"],[".",".",".",".","8",".",".","7","9"]]return = false
board
012345678053..7...516..195...2.98....6.38...6...344..8.3..157...2...66.6....28.7...419..58....8..79

The first row contains digit 5 twice.

Constraints

  • board.length == 9.
  • board[i].length == 9.
  • Every cell is '.' or a digit from '1' through '9'.

More Confluent Onsite Interview questions

  • Implement tail -nPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Sudoku Puzzle SolverPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Sequential Phrase Search Across DocumentsPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Bounded Combination Sum with Signed CandidatesONSITE INTERVIEW · Seen Oct 2026
  • Detect a Silent SensorONSITE INTERVIEW · Seen Sep 2026
  • Build an Inverted Document IndexONSITE INTERVIEW · Seen Sep 2026
  • Combination Sum with Unlimited ReuseONSITE INTERVIEW · Seen Sep 2026
  • Word Search Across DocumentsPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • Windowed Key-Value MapPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2025
  • Get Best PriceONSITE INTERVIEW · Seen Apr 2025

Similar questions at other companies

  • Sparse Matrix MultiplicationByteDance · PHONE SCREENByteDance interview questions
  • Validate Rectangular Game PiecesGoogle · ONSITE INTERVIEWGoogle interview questions
  • Set Matrix ZeroesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • Valid SudokuVerkada · PHONE SCREENVerkada interview questions
  • Query Whether an Island Size ExistsMeta · ONSITE INTERVIEWMeta interview questions
  • Game of Life on a Finite and an Infinite BoardCitadel · PHONE SCREENCitadel interview questions
  • Validate a Sudoku BoardZipRecruiter · ONSITE INTERVIEWZipRecruiter interview questions
  • Check a Partly Filled Sudoku GridExpedia · ONSITE INTERVIEWExpedia interview questions
  • Unique Pairs in a 2D Matrix Summing to TargetAmazon · PHONE SCREEN
  • Cache Shared Image Pipeline PrefixesAnthropic · ONSITE INTERVIEWAnthropic interview questions

Interview reports that mention this question

  • Confluent SWE OA, Coding and Design Interviews: 19 Experiences
  • Confluent Coding and System Design Questions: 33 Questions

Confluent interview experiences

  • Confluent Older Concurrency Rounds: 12 Experiences (Part 2 of 2)
  • Confluent Concurrency Interviews: 28 Experiences (Part 1 of 2)
  • Confluent File Manipulation Round (tail -n): 19 Experiences
All Confluent interview questionsSee Confluent hiring insights
Saved
class Solution {
    public boolean isValidSudoku(char[][] board) {
        // write your code here
    }
}
Checking account…