Sudoku solver

Input

Samples:

Solver

0

v1 (Newbie algorithm)
For every cell, check its row, column and box to see which numbers are still available. If there is only 1 candidate number, put that number. Repeat the process until all cells are solved. But this simple process could not solve harder Sudoku problems.
v2 (Backtracking algorithm)
Backtracking algorithm like the 8 Queen problem. Check for safety before placing a number on a cell, then proceed to the empty cells recursively. If it's a dead-end, undo 1 step back and try putting another number. If still fails, undo again. Able to solve ALL kinds of valid Sudoku problems.

Logs