Solving Algorithms
Master these fundamental solving techniques to conquer any Sudoku puzzle. Each algorithm builds upon logical deduction to fill cells that have only one possible solution.
Last Digit
Step 1 of 4
Last Digit - Step 1 of 4
Last digit (a.k.a. last remaining candidate) spots any row, column, or box already containing eight distinct digits; the missing digit must occupy the lone empty cell in that house because Sudoku rules require each digit 1–9 to appear exactly once per house.
Last Digit - Step 2 of 4
In the second row, there is only one empty cell left [2,2] Highlighted in blue.
Last Digit - Step 3 of 4
The digits 1, 3, 4, 5, 6, 7, 8, and 9 are already present in the row (highlighted in blue).
Last Digit - Step 4 of 4
Therefore, the only digit missing is '2', which must go in cell [2,2] (highlighted in blue).
Naked Singles
Step 1 of 3
Naked Singles - Step 1 of 3
A Naked Single occurs when a cell has only one candidate left after all eliminations.
Requirement: an entire house must be scanned for candidates.
Naked Singles - Step 2 of 3
After scanning ALL the candidates in this box, candidate '7' is the only candidate for a given cell (highlighted in blue).
Naked Singles - Step 3 of 3
Therefore, '7' must go in that cell (now filled and highlighted in blue).
Naked Singles - Step 4 of 3
Therefore, '7' must go in the first cell of the row (now filled and highlighted in blue).
Hidden Singles
Step 1 of 3
Hidden Singles - Step 1 of 3
A Hidden Single is a candidate that occurs exactly once among all candidates in a house (row, column or box). Even if the cell contains other candidates, that uniquely occurring candidate must occupy this cell.
Hidden Singles - Step 2 of 3
After scanning all candidates in this box, candidate '9' appears in only one cell (highlighted in blue).
Hidden Singles - Step 3 of 3
Therefore '9' must be placed in that cell — it is filled and shown in blue.
Pointing Pairs
Step 1 of 4
Pointing Pairs - Step 1 of 4
Pointing Pairs identify candidates confined to a single row or column within a box. Because those candidates cannot appear elsewhere in that house, they can be removed from the same row/column outside the box.
Pointing Pairs - Step 2 of 4
After scanning ALL the candidates of this last box, candidates '3' are only found in the two highlighted cells (in blue) within the same row.
Pointing Pairs - Step 3 of 4
Eventhough these cells have other candidates, since the candidates '3' (of this box) can only appear in these two cells, we can eliminate candidate '3' from all other cells in the same row (outside the box).
Pointing Pairs - Step 4 of 4
It can also work with 3 candidates.
Naked Pairs
Step 1 of 3
Naked Pairs - Step 1 of 3
This strategy identifies exactly two cells within a house (row, column, or box) that contain exactly the same two candidates. When found, these two values can be eliminated from all other cells in the shared houses, as they must occupy these two cells.
Naked Pairs - Step 2 of 3
After scanning all candidates in this last box, two cells contain only the same two candidates '1' and '2' (highlighted in blue).
Naked Pairs - Step 3 of 3
Since those cells can only contain '1' or '2', these candidates can be eliminated from all other cells in the shared houses.
X-Wing
Step 1 of 4
X-Wing - Step 1 of 4
X-Wing is an advanced technique that uses two rows and two columns. If a candidate appears in exactly two cells in each of two rows (or columns), and these cells align in the same two columns (or rows), that candidate can be eliminated from all other cells in those columns (or rows), because it must occupy one of the four cells in the X-Wing pattern.
X-Wing - Step 2 of 4
After scanning all candidates, highlight the two rows (red) where a candidate is restricted to exactly the same two columns (blue).
X-Wing - Step 3 of 4
The X-Wing pattern is formed at the intersections of these rows and columns (highlighted in blue).
X-Wing - Step 4 of 4
Therefore, eliminate this candidate from all other cells in the highlighted columns and rows.
Swordfish
Step 1 of 4
Swordfish - Step 1 of 4
Swordfish is an advanced technique that extends X-Wing to three rows and three columns. If a candidate appears in exactly three cells in each of three rows (or columns), and these cells align in the same three columns (or rows), that candidate can be eliminated from all other cells in those rows and columns, because it must occupy one of the nine cells in the Swordfish pattern.
Swordfish - Step 2 of 4
After scanning all candidates, highlight the three rows (red) where a candidate is restricted to exactly the same three columns (blue).
Swordfish - Step 3 of 4
The Swordfish pattern is formed at the intersections of these rows and columns (highlighted in blue).
Swordfish - Step 4 of 4
Therefore, eliminate this candidate from all other cells in the highlighted rows and columns.
XY-Wing
Step 1 of 5
XY-Wing - Step 1 of 5
XY-Wing is a pattern formed by three cells, each with exactly two candidates: XY (pivot), XZ, and YZ (wings). If the pivot sees both wings, any cell that sees both wings cannot contain the shared candidate Z.
XY-Wing - Step 2 of 5
After scanning all candidates, identify three cells with candidates XY, XZ, and YZ (highlighted in blue and red).
XY-Wing - Step 3 of 5
The pivot cell (red) shares a house with both wings (blue), and each pair of cells shares one candidate. In this example, the pivot shares '4' with one wing and '1' with the other; both wings share '3'.
XY-Wing - Step 4 of 5
Any cell that sees both wings (highlighted in green) cannot contain the shared candidate '3'.
XY-Wing - Step 5 of 5
Therefore, eliminate candidate '3' from all cells that see both wings.