01 · Question
Given a 9x9 grid, board, representing a Sudoku, return true if the board does not have any conflicts and false otherwise. The board contains only numbers between 0 and 9 in each cell, with 0's denoting empty cells.
A conflict is a duplicate number (other than 0) along a row, a column, or a 3x3 subgrid.
Example 1:
- Input: A valid Sudoku board.
- Output:
true
Example 2:
- Input: A board with duplicates in the first row.
- Output:
false