A while back I found a small code segment that solves your Sudoku problems.
This code is written for solving the 3×3(blocks) puzzle, where puzzle is an 81 character string representing the puzzle read left-to-right, top-to-bottom, and 0 is a blank.
Java – Sudoku solver
3