Dashboard
LC #36
Valid Sudoku
Pattern · ?
Problem
Determine if a 9 x 9 Sudoku board is valid. Only the filled cells need to be validated according to the rules.
Constraints
- board.length == 9, board[i].length == 9
- board[i][j] is a digit 1-9 or '.'
Example
- Input
- board = [["5","3",".",".","7",".",".",".","."],...]
- Output
- true
- Why
- Check if each row, column, and 3x3 box contains digits 1-9 without repetition.
Spot the pattern
Which pattern cracks it?
Hints
One at a time