← ALL NOTES
Array

37. Sudoku Solver

The engine is ordinary backtracking; what makes it fast is almost entirely the order in which it guesses. Represent each row, column, and box as a 9-bit mask (bit d set means digit d+1 is taken), so…

Loading…