Validate a Sudoku Board

easy
Unit 3 · Arrays & Two Pointers0/3 to milestone

A Sudoku board is a 9×9 list of lists with digits 1–9, and 0 for empty cells. Implement is_valid_board(board): no digit repeats within any row, column or 3×3 box. Empty cells are ignored. Raise ValueError if the board isn't 9×9 or contains values outside 0–9.

Then implement conflicts(board), returning a sorted list of (row, col) cells involved in any repetition, so a UI can highlight them.

#arrays#sets#validation2 visible + 2 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Validate a Sudoku Board · TechGradify