Fewest options first
transcript
A sudoku has 51 empty cells. Some cells have only one choice. Which cell do you fill first? Reading order is slow. Pick the most constrained one.
Four cells have these options left. Each count comes from the masks. Zero options is a dead end. One option is forced. Eight options can wait.
A forced cell costs nothing. A dead end ends the branch. No later work is wasted. Both show up early.
Reading order makes 4,632 calls. Fewest options makes only 52. Same answer, far fewer calls.
Keep one mask per row. Bit sets keep this cheap. One per column, one per box. Options are what none holds. Count the free bits.
Compute each cell's options. Keep the smallest count. Ties keep the first cell. Fill that cell next.
Count the options of each cell. Fill the smallest first. Then fill it, and move on. Stop at a dead end. Full breakdown in the lecture.