FastPrepValid Sudoku
Problems/Valid Sudoku

Valid Sudoku

Verkada logoVerkada● MediumFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report names the well-known Valid Sudoku problem but leaves out the function signature, examples, and limits. Our version is about 95% the same as the reported question.

Determine whether a partially filled 9 x 9 Sudoku board is valid.

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. Empty cells contain ..

Validate only the filled cells; 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 filled row, column, or sub-box contains a repeated digit.

Example 2

board = [["8","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 = false
board
012345678083..7....16..195...2.98....6.38...6...344..8.3..157...2...66.6....28.7...419..58....8..79

The upper-left sub-box contains two cells with digit 8.

Constraints

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

More Verkada Phone Screen questions

  • Find the Unique User with Access to Every CameraPHONE SCREEN · Seen Nov 2026
  • Host Log ParserPHONE SCREEN · Seen Sep 2026
  • Common Camera Motion IntervalsPHONE SCREEN · Seen Sep 2026
  • Time-Based Key-Value StorePHONE SCREEN · Seen Aug 2026
  • Camera Log API SequencePHONE SCREEN · Seen Aug 2026
  • Find Valid IP AddressesPHONE SCREEN · Seen Apr 2026

Similar questions at other companies

  • Sudoku Board ValidationConfluent · PHONE SCREEN · ONSITE INTERVIEWConfluent interview questions
  • Sparse Matrix MultiplicationByteDance · PHONE SCREENByteDance interview questions
  • Game of Life on a Finite and an Infinite BoardCitadel · PHONE SCREENCitadel interview questions
  • Unique Pairs in a 2D Matrix Summing to TargetAmazon · PHONE SCREEN
  • Validate Rectangular Game PiecesGoogle · ONSITE INTERVIEWGoogle interview questions
  • Set Matrix ZeroesMicrosoft · ONSITE INTERVIEWMicrosoft interview questions
  • First Completed Mingo LineEpic · OAEpic interview questions
  • Query Whether an Island Size ExistsMeta · ONSITE INTERVIEWMeta interview questions
  • Count 2x2 Submatrices by Black CellsTikTok · OATikTok interview questions
  • Validate a Sudoku BoardZipRecruiter · ONSITE INTERVIEWZipRecruiter interview questions
All Verkada interview questionsSee Verkada hiring insights
Saved
class Solution {
    public boolean isValidSudoku(char[][] board) {
        // write your code here
    }
}
Checking account…