Skip to content
StackDecode
BacktrackingExplained

Sudoku Solver

Fill cells with legal digits, undoing wrong guesses.

Time

O(9^empty)

Extra space

O(81)

Use it for

Constraint puzzles.

An animated walkthrough for this algorithm isn’t built yet. The summary above explains the idea; see the related animated algorithms below to practise the same technique.