Given a 9x9 Sudoku board, determine whether the currently filled cells satisfy Sudoku's placement rules: each row, each column, and each of the nine 3x3 sub-boxes must contain the digits 1-9 without repetition. Empty cells don't need to be validated — you're only checking that the digits already placed don't conflict.
board = 9x9 grid with a few digits placed, no conflictstrueboard with two '8's in the same columnfalseSolve it in the editor. Sign in free to run your Python or JavaScript against test cases, get a verdict, and track your attempts.
Solve on FeatCode →Arrays give O(1) index access; hash maps and sets give O(1) average lookup, insert, and delete by trading space for speed. Together they're the toolkit for turning brute-force O(n²) comparisons into a single O(n) pass.
Read the full Arrays & Hashing guide →
Original problem on LeetCode ↗